summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2010-03-17 20:12:16 -0700
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2010-03-17 20:12:16 -0700
commit5d8181b24e6beed6a3fce863a6093bc6a8f0b3ed (patch)
treef4f8a13f886586477e222196e8e663971e061403
parent63ff3bdf9a2fd1967380ad7602d0ce4e44a4d432 (diff)
parent5361765cf9ba71e8c7a2d676922c2ce0d750050f (diff)
downloadpiny-code-5d8181b24e6beed6a3fce863a6093bc6a8f0b3ed.tar.gz
piny-code-5d8181b24e6beed6a3fce863a6093bc6a8f0b3ed.zip
Merge branch 'master' of piny.be:/srv/git/piny-code
-rw-r--r--architecture/data.mdwn2
-rw-r--r--architecture/needed_user_facing_infrastructure.mdwn6
-rwxr-xr-xusr/local/sbin/addaccess4
-rwxr-xr-xusr/local/sbin/newrepo4
-rwxr-xr-xusr/local/sbin/rmaccess4
-rwxr-xr-xusr/local/sbin/rmrepo2
6 files changed, 11 insertions, 11 deletions
diff --git a/architecture/data.mdwn b/architecture/data.mdwn
index ce951e0..7d6cc97 100644
--- a/architecture/data.mdwn
+++ b/architecture/data.mdwn
@@ -8,7 +8,7 @@ username #usually $ENV{SUDO_USER} # !~ /^git-|^ikiwiki-/ and =~ /^[a-zA-Z0-9
uid #/etc/passwd # None
email #/etc/passwd GECOS #Email::Valid::Loose->new("-fqdn" => 1, "-fudge" => 0, "-local_rules" => 0, "-mxcheck" => 1, "-tldcheck" => 0 );
repoaccess #/etc/group git-$reponame entry # None
-reponame #/srv/git/$reponame.git # =~ /^[a-z0-9][a-z0-9+.-]+$/
+reponame #/srv/git/$reponame.git # =~ /^[a-z0-9][a-z0-9.-]+$/
repodescription #/srv/git/$reponame.git/description # =~ /^[\x{0020}-\x{FDCF}\x{FDF0}-\x{FFFD}]{1,80}$/
repoowner #stat /srv/git/$reponame.git uid; might be better as first non-ikiwiki user in /etc/group git-$reponame entry # None
repoglobalwritable #stat /srv/git/$reponame.git all write bit # None
diff --git a/architecture/needed_user_facing_infrastructure.mdwn b/architecture/needed_user_facing_infrastructure.mdwn
index 084c1fb..de62a32 100644
--- a/architecture/needed_user_facing_infrastructure.mdwn
+++ b/architecture/needed_user_facing_infrastructure.mdwn
@@ -8,11 +8,11 @@ anonymous account creation |DONE: ssh createuser@piny.be |TODO: CGI frontend
password modification |DONE: /srv/rbin/passwd |TODO: Authen::PAM chauthtok CGI jblake: the pam interface was *really* not designed with http in mind though if you hard-code the interaction script it's not hard at all
repo creation, deletion |DONE: /srv/rbin/newrepo, rmrepo, TODO: lsrepo |TODO: CGI frontend
repo user management |DONE: /srv/rbin/addaccess, rmaccess TODO: lsaccess |TODO: CGI frontend
-[[mailing list addition|mail]] |TODO: ssh piny /srv/rbin/addlist |TODO: CGI frontend
+[[mailing list addition|mail]] |TODO: /srv/rbin/addlist |TODO: CGI frontend
authorized_keys modification |TODO: cmdlind frontend to cat > ~/.ssh/authorized_keys |TODO: CGI frontend, though i am not convinced anyone would care
disable password auth if ssh key|TODO |Ha ha NEVER
-config tweaking |TODO: ssh piny /srv/rbin/chrepo |TODO: CGI frontend
-commit access |DONE: git+ssh://piny/srv/whatever.git |DONE: Ikiwiki+mod-auth-sys-group/mod-auth-pam, though I am told there is a magic hook to allow public editing through git://
+config tweaking |TODO: /srv/rbin/chrepo |TODO: CGI frontend
+commit access |DONE: git+ssh://piny.be/srv/git/whatever.git |DONE: Ikiwiki+mod-auth-sys-group/mod-auth-pam, though I am told there is a magic hook to allow public editing through git://
wysiwyg editing tool |Ha ha no |TODO
"""]]
diff --git a/usr/local/sbin/addaccess b/usr/local/sbin/addaccess
index 07cc893..b1b2916 100755
--- a/usr/local/sbin/addaccess
+++ b/usr/local/sbin/addaccess
@@ -8,10 +8,10 @@ my( $reponame, $uid, $gitowner);
if ( ( ! scalar $ARGV[1] ) or ( scalar $ARGV[2] ) ) { # must have exactly two arguments
print( "Usage: addaccess USER REPONAME\n" );
exit( 1 );
-} elsif ( ( $ARGV[0] !~ /^[a-zA-Z0-9_.][a-zA-Z0-9_.-]+$/ ) or ( $ARGV[1] !~ /^[a-z0-9][a-z0-9+.-]+$/ ) ) { # Extra paranoid sanity checking
+} elsif ( ( $ARGV[0] !~ /^[a-zA-Z0-9_.][a-zA-Z0-9_.-]+$/ ) or ( $ARGV[1] !~ /^[a-z0-9][a-z0-9-]+$/ ) ) { # Extra paranoid sanity checking
print( "Usage: addaccess USER REPONAME\n" );
print( " USER must consist only of letters, digits, underscores, periods, and dashes, and not start with a dash.\n" );
- print( " REPONAME must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.).\n" );
+ print( " REPONAME must consist only of lower case letters (a-z), digits (0-9), and minus (-) signs.\n" );
print( " REPONAME must be at least two characters long and must start with an alphanumeric character.\n" );
exit( 1 );
} else {
diff --git a/usr/local/sbin/newrepo b/usr/local/sbin/newrepo
index 8cee460..15bbde6 100755
--- a/usr/local/sbin/newrepo
+++ b/usr/local/sbin/newrepo
@@ -6,9 +6,9 @@ use warnings;
my( $errorto ) = 'jrayhawk+piny.be@omgwallhack.org'; # Email address to send horrible errors to.
my( $reponame, $email, @errors, $wikilisttempfile, $cgitrctempfile, $description );
-if ( ( ! scalar $ARGV[0] ) or ( scalar $ARGV[1] ) or ( $ARGV[0] !~ /^[a-z0-9][a-z0-9+.-]+$/ ) ) {
+if ( ( ! scalar $ARGV[0] ) or ( scalar $ARGV[1] ) or ( $ARGV[0] !~ /^[a-z0-9][a-z0-9-]+$/ ) ) {
print( "Usage: newrepo REPONAME\n" );
- print( " REPONAME must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.).\n" );
+ print( " REPONAME must consist only of lower case letters (a-z), digits (0-9), and minus (-) signs.\n" );
print( " REPONAME must be at least two characters long and must start with an alphanumeric character.\n" );
exit( 1 );
} else {
diff --git a/usr/local/sbin/rmaccess b/usr/local/sbin/rmaccess
index 2f7e06e..06b4f07 100755
--- a/usr/local/sbin/rmaccess
+++ b/usr/local/sbin/rmaccess
@@ -8,10 +8,10 @@ my( $reponame, $uid, $gitowner);
if ( ( ! scalar $ARGV[1] ) or ( scalar $ARGV[2] ) ) { # must have exactly two arguments
print( "Usage: rmaccess USER REPONAME\n" );
exit( 1 );
-} elsif ( ( $ARGV[0] !~ /^[a-zA-Z0-9_.][a-zA-Z0-9_.-]+$/ ) or ( $ARGV[1] !~ /^[a-z0-9][a-z0-9+.-]+$/ ) ) { # Extra paranoid sanity checking
+} elsif ( ( $ARGV[0] !~ /^[a-zA-Z0-9_.][a-zA-Z0-9_.-]+$/ ) or ( $ARGV[1] !~ /^[a-z0-9][a-z0-9-]+$/ ) ) { # Extra paranoid sanity checking
print( "Usage: rmaccess USER REPONAME\n" );
print( " USER must consist only of letters, digits, underscores, periods, and dashes, and not start with a dash.\n");
- print( " REPONAME must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.).\n" );
+ print( " REPONAME must consist only of lower case letters (a-z), digits (0-9), and minus (-) signs.\n" );
print( " REPONAME must be at least two characters long and must start with an alphanumeric character.\n" );
exit( 1 );
} else {
diff --git a/usr/local/sbin/rmrepo b/usr/local/sbin/rmrepo
index 5c67339..864830f 100755
--- a/usr/local/sbin/rmrepo
+++ b/usr/local/sbin/rmrepo
@@ -5,7 +5,7 @@ use warnings;
my( $reponame, $uid, $gitowner, $wikilisttempfile, $cgitrctempfile);
-if ( ( ! scalar $ARGV[0] ) or ( scalar $ARGV[1] ) or ( $ARGV[0] !~ /^[a-z0-9][a-z0-9+.-]+$/ ) ) {
+if ( ( ! scalar $ARGV[0] ) or ( scalar $ARGV[1] ) or ( $ARGV[0] !~ /^[a-z0-9][a-z0-9-]+$/ ) ) {
print( "Usage: rmrepo REPONAME\n" );
exit( 1 );
} else {