ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/CCSAdmin/adduser.c
(Generate patch)

Comparing CCSAdmin/adduser.c (file contents):
Revision 583 by douglas, 2005-11-21T12:56:05-08:00 vs.
Revision 806 by douglas, 2006-06-28T19:53:21-07:00

# Line 12 | Line 12
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  
# Line 40 | Line 43 | int main(int argc, char *argv[])
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);
# Line 106 | Line 109 | int main(int argc, char *argv[])
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);
# Line 131 | Line 134 | int main(int argc, char *argv[])
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))
# Line 193 | Line 196 | int main(int argc, char *argv[])
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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines