equal
deleted
inserted
replaced
34 |
34 |
35 our ( $VERSION, @ISA, @EXPORT_OK ); |
35 our ( $VERSION, @ISA, @EXPORT_OK ); |
36 use Exporter; |
36 use Exporter; |
37 |
37 |
38 # set the version for version checking |
38 # set the version for version checking |
39 $VERSION = 0.1; |
39 $VERSION = 0.2; |
40 |
40 |
41 @ISA = qw(Exporter); |
41 @ISA = qw(Exporter); |
42 @EXPORT_OK = qw(readconfig mkpasswd useradd userdel userexpiry usage); |
42 @EXPORT_OK = qw(readconfig mkpasswd useradd userdel userexpiry usage); |
43 } |
43 } |
44 |
44 |
66 www_group=s |
66 www_group=s |
67 master_user=s) |
67 master_user=s) |
68 ) or die 'Failed to read config!'; |
68 ) or die 'Failed to read config!'; |
69 $conf->file($_) |
69 $conf->file($_) |
70 for grep -e, map "$_/ius-dav-htpasswd.conf", |
70 for grep -e, map "$_/ius-dav-htpasswd.conf", |
71 qw(/etc/ius-dav-htpasswd /usr/local/etc/ius-dav-htpasswd ~/.ius-dav-htpasswd ./ius-dav-htpasswd); |
71 qw(/etc/ius-dav-htpasswd /usr/local/etc/ius-dav-htpasswd ~/.ius-dav-htpasswd .); |
72 return { $conf->varlist('.') }; |
72 return { $conf->varlist('.') }; |
73 |
73 |
74 } |
74 } |
75 |
75 |
76 sub validate { |
76 sub validate { |
137 Deny From None |
137 Deny From None |
138 AuthType Basic |
138 AuthType Basic |
139 AuthName "$user" |
139 AuthName "$user" |
140 AuthUserFile "$htpasswd_file" |
140 AuthUserFile "$htpasswd_file" |
141 Require user $master_user $user |
141 Require user $master_user $user |
|
142 Options +Indexes |
142 </Directory> |
143 </Directory> |
|
144 # vi:ft=apache |
143 EOC |
145 EOC |
144 close C; |
146 close C; |
145 |
147 |
146 0 == system qw(apache2ctl graceful) |
148 0 == system qw(apache2ctl graceful) |
147 or die "Can't 'apache2ctl graceful'!"; |
149 or die "Can't 'apache2ctl graceful'!"; |
286 |
288 |
287 =back |
289 =back |
288 |
290 |
289 =head1 FILES |
291 =head1 FILES |
290 |
292 |
291 F</etc/dav-htpasswd.conf> |
293 F</etc/ius-dav-htpasswd/ius-dav-htpasswd.conf> |
292 |
294 |
293 F</usr/local/etc/dav-htpasswd.conf> |
295 F</usr/local/etc/ius-dav-htpasswd/ius-dav-htpasswd.conf> |
294 |
296 |
295 F<~/dav-htpasswd.conf> |
297 F<~/.ius-dav-htpasswd/ius-dav-htpasswd.conf> |
296 |
298 |
297 F<./dav-htpasswd.conf> |
299 F<./ius-dav-htpasswd.conf> |
298 |
300 |
299 F</srv/dav> |
301 F</srv/dav> |
300 |
302 |
301 F</etc/apache2/htpasswd> |
303 F</etc/apache2/htpasswd> |
302 |
304 |