summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorJon Robertson <jonrober@stanford.edu>2014-05-27 11:28:35 -0700
committerRuss Allbery <rra@stanford.edu>2014-05-27 11:33:36 -0700
commit92f453fe8b1e1b1b2991f311576e610793e29d5b (patch)
treeeacb37a47b99afe9b421713fe84d510d14e88da6 /perl
parent76ccf098c6e9c8849c8ca459a54d7383baf39ddb (diff)
Added /cron principals to Stanford policy and summary
cron principals were being rejected due to not being a part of the Stanford Policy module. Change-Id: Ic67a8e2bce8474431163b74d97c2bf1fb184a4b7 Reviewed-on: https://gerrit.stanford.edu/1488 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'perl')
-rw-r--r--perl/Wallet/Policy/Stanford.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perl/Wallet/Policy/Stanford.pm b/perl/Wallet/Policy/Stanford.pm
index 8bf4257..5ac29e0 100644
--- a/perl/Wallet/Policy/Stanford.pm
+++ b/perl/Wallet/Policy/Stanford.pm
@@ -279,6 +279,11 @@ sub verify_name {
and $principal !~ /^(class|dept|group)-[a-z0-9_-]+$/) {
return "invalid CGI principal name $name";
}
+ } elsif ($instance eq 'cron') {
+ if ($principal !~ /^[a-z][a-z0-9]{1,7}$/
+ and $principal !~ /^(class|dept|group)-[a-z0-9_-]+$/) {
+ return "invalid cron principal name $name";
+ }
} else {
return "unknown principal type $principal";
}