add support for @owner and @group in PLIST

This commit is contained in:
Michael Haro 2000-01-22 22:06:04 +00:00
parent 55681e0d90
commit 4922b641a8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=24948
2 changed files with 24 additions and 0 deletions

View File

@ -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 {

View File

@ -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 {