add support for @owner and @group in PLIST
This commit is contained in:
parent
55681e0d90
commit
4922b641a8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=24948
@ -280,6 +280,18 @@ sub checkplist {
|
||||
}
|
||||
} elsif ($_ =~ /^\@(comment)/) {
|
||||
$rcsidseen++ if (/\$$rcsidstr[:\$]/);
|
||||
} elsif ($_ =~ /^\@(owner|group)\s+$/) {
|
||||
&perror("WARN: $_ missing name in PLIST");
|
||||
} elsif ($_ =~ /^\@(owner)(\s+)(.*)/) {
|
||||
$space = $2;
|
||||
$user = $3;
|
||||
&perror("WARN: multiple spaces found in \"$_\"") if ($space =~ /\s\s+/);
|
||||
&perror("WARN: \"$user\" unknown user in PLIST") if (getpwnam($user) eq "");
|
||||
} elsif ($_ =~ /^\@(group)(\s+)(.*)/) {
|
||||
$space = $2;
|
||||
$group = $3;
|
||||
&perror("WARN: multiple spaces found in \"$_\"") if ($space =~ /\s\s+/);
|
||||
&perror("WARN: \"$group\" unknown group in PLIST") if (getgrnam($group) eq "");
|
||||
} elsif ($_ =~ /^\@(dirrm|option)/) {
|
||||
; # no check made
|
||||
} else {
|
||||
|
@ -280,6 +280,18 @@ sub checkplist {
|
||||
}
|
||||
} elsif ($_ =~ /^\@(comment)/) {
|
||||
$rcsidseen++ if (/\$$rcsidstr[:\$]/);
|
||||
} elsif ($_ =~ /^\@(owner|group)\s+$/) {
|
||||
&perror("WARN: $_ missing name in PLIST");
|
||||
} elsif ($_ =~ /^\@(owner)(\s+)(.*)/) {
|
||||
$space = $2;
|
||||
$user = $3;
|
||||
&perror("WARN: multiple spaces found in \"$_\"") if ($space =~ /\s\s+/);
|
||||
&perror("WARN: \"$user\" unknown user in PLIST") if (getpwnam($user) eq "");
|
||||
} elsif ($_ =~ /^\@(group)(\s+)(.*)/) {
|
||||
$space = $2;
|
||||
$group = $3;
|
||||
&perror("WARN: multiple spaces found in \"$_\"") if ($space =~ /\s\s+/);
|
||||
&perror("WARN: \"$group\" unknown group in PLIST") if (getgrnam($group) eq "");
|
||||
} elsif ($_ =~ /^\@(dirrm|option)/) {
|
||||
; # no check made
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user