12 |
|
#include <sys/types.h> |
13 |
|
#include <sys/stat.h> |
14 |
|
#include <fcntl.h> |
15 |
+ |
|
16 |
+ |
#ifdef _Master_ |
17 |
|
#include <fts.h> |
18 |
+ |
#endif |
19 |
|
|
20 |
|
#include "common.h" |
21 |
|
|
43 |
|
return 1; |
44 |
|
} |
45 |
|
|
46 |
< |
#ifdef _Zweihander_ |
46 |
> |
#ifdef _Master_ |
47 |
|
regex_t user_, name_; |
48 |
|
|
49 |
|
regcheck(regcomp(&user_, "^-user=([a-z0-9]{1,16})$", REG_EXTENDED), &user_, environment); |
109 |
|
|
110 |
|
check(pipe(pipe_), environment); |
111 |
|
|
112 |
< |
pid_t bash; |
112 |
> |
pid_t bash_; |
113 |
|
|
114 |
< |
if (!(bash = check(fork(), environment))) |
114 |
> |
if (!(bash_ = check(fork(), environment))) |
115 |
|
{ |
116 |
|
check(dup2(pipe_[0], 0), environment); |
117 |
|
check(close(pipe_[1]), environment); |
134 |
|
|
135 |
|
int status; |
136 |
|
|
137 |
< |
check(waitpid(bash, &status, 0), environment); |
137 |
> |
check(waitpid(bash_, &status, 0), environment); |
138 |
|
check(unlink(slappasswd), environment); |
139 |
|
|
140 |
|
if (WEXITSTATUS(status)) |
196 |
|
if (fts_close(traversal)) |
197 |
|
longjmp(environment, 1); |
198 |
|
#else |
199 |
< |
longjmp(environment, (int)"Log in to zweihander.ccs.ucsb.edu to add users"); |
199 |
> |
longjmp(environment, (int)"Log in to " MASTER " to add users"); |
200 |
|
#endif |
201 |
|
|
202 |
|
return 0; |