Skip to content

Commit

Permalink
lib/chkname.c: is_valid_name(): Split Samba check
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
alejandro-colomar committed Dec 24, 2024
1 parent 07edb8f commit cddc517
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/chkname.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@ is_valid_name(const char *name)
}

while (!streq(++name, "")) {
if (streq(name, "$")) // Samba
return true;

if (!(isalnum(*name) ||
*name == '_' ||
*name == '.' ||
*name == '-' ||
streq(name, "$")
*name == '-'
))
{
errno = EILSEQ;
Expand Down

0 comments on commit cddc517

Please sign in to comment.