diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-06-25 12:36:31 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-06-25 12:36:31 +0300 |
commit | 33ba97cd28f138b49697273e445b479d42bf42a9 (patch) | |
tree | a2d1fe3d439dd92dbcf33e23fc07cfad8d264e52 | |
parent | ec125e9f860adf89f72e25641c65a1dc79c1e4a9 (diff) | |
download | gitaclhook-33ba97cd28f138b49697273e445b479d42bf42a9.tar.gz gitaclhook-33ba97cd28f138b49697273e445b479d42bf42a9.tar.bz2 |
Bugfixes.release-1.00
* gitacl.schema: An example LDAP schema.
* MANIFEST: Add gitacl.schema
* Makefile.PL: Update.
* gitaclhook: Fix passing 'user' parameter in test mode.
* lib/GitACL.pm: Fix malformed references.
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | Makefile.PL | 3 | ||||
-rw-r--r-- | gitacl.schema | 49 | ||||
-rwxr-xr-x | gitaclhook | 2 | ||||
-rw-r--r-- | lib/GitACL.pm | 8 |
5 files changed, 58 insertions, 5 deletions
@@ -6 +6,2 @@ lib/GitACL/File.pm | |||
6 | lib/GitACL/LDAP.pm | 6 | lib/GitACL/LDAP.pm |
7 | gitacl.schema | ||
diff --git a/Makefile.PL b/Makefile.PL index 0d5e8b3..db3859d 100644 --- a/Makefile.PL +++ b/Makefile.PL | |||
@@ -24,2 +24,5 @@ WriteMakefile( | |||
24 | 'NAME' => 'gitaclhook', | 24 | 'NAME' => 'gitaclhook', |
25 | 'ABSTRACT_FROM' => 'gitaclhook', | ||
26 | 'AUTHOR' => 'Sergey Poznyakoff <gray@gnu.org>', | ||
27 | 'LICENSE' => 'gpl', | ||
25 | 'FIRST_MAKEFILE' => 'Makefile', | 28 | 'FIRST_MAKEFILE' => 'Makefile', |
diff --git a/gitacl.schema b/gitacl.schema new file mode 100644 index 0000000..d8083e5 --- /dev/null +++ b/gitacl.schema | |||
@@ -0,0 +1,49 @@ | |||
1 | # Git LDAP schema items | ||
2 | # | ||
3 | # depends upon: | ||
4 | # nis.schema | ||
5 | |||
6 | attributetype ( 1.3.6.1.4.1.9163.2.3.1.0 NAME 'gitAclProject' | ||
7 | DESC 'Project for which the ACL entry is defined' | ||
8 | EQUALITY caseExactMatch | ||
9 | SUBSTR caseExactSubstringsMatch | ||
10 | SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} | ||
11 | SINGLE-VALUE ) | ||
12 | |||
13 | attributetype ( 1.3.6.1.4.1.9163.2.3.1.1 NAME 'gitAclVerb' | ||
14 | DESC 'ACL verb' | ||
15 | EQUALITY caseExactMatch | ||
16 | SUBSTR caseExactSubstringsMatch | ||
17 | SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} | ||
18 | SINGLE-VALUE ) | ||
19 | |||
20 | attributetype ( 1.3.6.1.4.1.9163.2.3.1.2 NAME 'gitAclOp' | ||
21 | DESC 'ACL opcode: any combination of C, D, U or R' | ||
22 | EQUALITY caseExactMatch | ||
23 | SUBSTR caseExactSubstringsMatch | ||
24 | SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} ) | ||
25 | |||
26 | attributetype ( 1.3.6.1.4.1.9163.2.3.1.3 NAME 'gitAclRef' | ||
27 | DESC 'Git ref' | ||
28 | EQUALITY caseExactMatch | ||
29 | SUBSTR caseExactSubstringsMatch | ||
30 | SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} ) | ||
31 | |||
32 | attributetype ( 1.3.6.1.4.1.9163.2.3.1.4 NAME 'gitAclOrder' | ||
33 | DESC 'an integer to order ACL entries' | ||
34 | EQUALITY integerMatch | ||
35 | SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 | ||
36 | SINGLE-VALUE ) | ||
37 | |||
38 | attributetype ( 1.3.6.1.4.1.9163.2.3.1.5 NAME 'gitAclUser' | ||
39 | DESC 'Git username' | ||
40 | EQUALITY caseExactMatch | ||
41 | SUBSTR caseExactSubstringsMatch | ||
42 | SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} ) | ||
43 | |||
44 | objectclass ( 1.3.6.1.4.1.9163.2.3.2.0 NAME 'gitACL' | ||
45 | DESC 'Git Access Control List Entry' | ||
46 | SUP top STRUCTURAL | ||
47 | MUST ( cn $ gitAclProject $ gitAclVerb ) | ||
48 | MAY ( gitAclUser $ gitAclOp $ gitAclRef $ gitAclOrder $ description ) ) | ||
49 | |||
@@ -338,3 +338,3 @@ unless ($ENV{GIT_DIR}) { | |||
338 | $args{git_dir} = $ENV{GIT_DIR} = $ARGV[0]; | 338 | $args{git_dir} = $ENV{GIT_DIR} = $ARGV[0]; |
339 | $args{user_name} = $ARGV[1]; | 339 | $args{user} = $ARGV[1]; |
340 | $args{op} = $ARGV[2]; | 340 | $args{op} = $ARGV[2]; |
diff --git a/lib/GitACL.pm b/lib/GitACL.pm index 51024ac..57b38b8 100644 --- a/lib/GitACL.pm +++ b/lib/GitACL.pm | |||
@@ -42,3 +42,3 @@ sub logmsg($$$;$) { | |||
42 | 42 | ||
43 | open($fd, $self->logfile); | 43 | open($fd, $self->{logfile}); |
44 | if ($loc) { | 44 | if ($loc) { |
@@ -56,3 +56,3 @@ sub deny($$;$) { | |||
56 | "$self->{project_name}:$self->{user_name}:". | 56 | "$self->{project_name}:$self->{user_name}:". |
57 | "opstr{$self->{op}}:$self->{ref}:$self->{old}:$self->{new}: $msg", | 57 | "$opstr{$self->{op}}:$self->{ref}:$self->{old}:$self->{new}: $msg", |
58 | $loc); | 58 | $loc); |
@@ -178,4 +178,4 @@ sub new { | |||
178 | } | 178 | } |
179 | if ($obj->{logfile} && $obj->logfile !~ /[>|]/) { | 179 | if ($obj->{logfile} && $obj->{logfile} !~ /[>|]/) { |
180 | $obj->{logfile} = ">>${obj->logfile}"; | 180 | $obj->{logfile} = ">>$obj->{logfile}"; |
181 | } | 181 | } |