greenbone / openvas-smb

SMB module for OpenVAS Scanner
GNU General Public License v2.0
47 stars 47 forks source link

Escape slashes in git revision #16

Closed wiegandm closed 6 years ago

wiegandm commented 6 years ago

When working with a pull request the git revision returned by the command git rev-parse --abbrev-ref HEAD will return something like pull/1234 as the branch name.

Using revision strings containing slashes result in build failures since the string is used for the .so files, leading to file names ending ending in ~git-1a2b3c4-pull/1234 passed as output files to the linker which interprets the slash as a separator and attempts to write to a non-existent directory.

This commit replaces any slashes with underscores, resulting in a suffix like pull_1234 instead.