summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel/portlint/src/portlint.pl12
-rw-r--r--ports-mgmt/portlint/src/portlint.pl12
2 files changed, 24 insertions, 0 deletions
diff --git a/devel/portlint/src/portlint.pl b/devel/portlint/src/portlint.pl
index d575e78..c86ef30 100644
--- a/devel/portlint/src/portlint.pl
+++ b/devel/portlint/src/portlint.pl
@@ -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 {
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl
index d575e78..c86ef30 100644
--- a/ports-mgmt/portlint/src/portlint.pl
+++ b/ports-mgmt/portlint/src/portlint.pl
@@ -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 {
OpenPOWER on IntegriCloud