issue a warning when @owner or @group are found in the PLIST

This commit is contained in:
Michael Haro 2000-02-02 21:07:39 +00:00
parent 0349599ee0
commit 633118fd04
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=25417
2 changed files with 4 additions and 24 deletions

View File

@ -280,18 +280,8 @@ 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 ($_ =~ /^\@(owner|group)\s/) {
&perror("WARN: \@$1 should not be needed in PLIST");
} elsif ($_ =~ /^\@(dirrm|option)/) {
; # no check made
} else {

View File

@ -280,18 +280,8 @@ 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 ($_ =~ /^\@(owner|group)\s/) {
&perror("WARN: \@$1 should not be needed in PLIST");
} elsif ($_ =~ /^\@(dirrm|option)/) {
; # no check made
} else {