mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
Allow comments in group database.
The character `#' introduces a comment. Leading spaces and tabs are ignored: '^[ \t]*#.*\n$' Count an empty line - only spaces, tabs or newline - also as a comment. (to be compatibel with password database comments). '^[ \t]*\n$'
This commit is contained in:
parent
15d8c5b5a3
commit
4ccb26e49a
1 changed files with 2 additions and 2 deletions
|
|
@ -70,7 +70,7 @@ static int maxlinelength; /* current length of *line */
|
|||
* 256K is enough for 64,000 uids
|
||||
*/
|
||||
#define MAXLINELENGTHLIMIT (256 * 1024)
|
||||
|
||||
#define GROUP_IGNORE_COMMENTS 1 /* allow comments in /etc/group */
|
||||
|
||||
struct group *
|
||||
getgrent()
|
||||
|
|
@ -287,7 +287,7 @@ grscan(search, gid, name)
|
|||
for (cp = line; *cp != '\0'; cp++)
|
||||
if (*cp != ' ' && *cp != '\t')
|
||||
break;
|
||||
if (*cp == '#')
|
||||
if (*cp == '#' || *cp == '\0')
|
||||
continue;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue