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

Comparing CCSAdmin/passwd.c (file contents):
Revision 562 by douglas, 2005-08-27T21:46:39-07:00 vs.
Revision 806 by douglas, 2006-06-28T19:53:21-07:00

# Line 8 | Line 8
8  
9   int main(int argc, char *argv[])
10   {
11 +        if (argc < 1)
12 +                return 1;
13 +
14 +        umask(S_IWGRP | S_IWOTH);
15 +        
16          int exception;
17          jmp_buf environment;
18  
# Line 25 | Line 30 | int main(int argc, char *argv[])
30                  return 1;
31          }
32  
33 < #ifdef _Zweihander_
33 > #ifdef _Master_
34          char user[MAXLOGNAME] = "";
35  
36          if (!getuid())
# Line 48 | Line 53 | int main(int argc, char *argv[])
53                          }
54                  }
55  
56 +                regfree(&user_);
57 +
58                  if (strlen(user))
59                          goto on;
60                  else
# Line 66 | Line 73 | int main(int argc, char *argv[])
73                  longjmp(environment, 1);
74  
75          strlcpy(user, entry->pw_name, sizeof (user));
69
76   on:     authenticate(argv[0], environment);
77  
78          char password[_PASSWORD_LEN];
# Line 111 | Line 117 | on:    authenticate(argv[0], environment);
117          if (WEXITSTATUS(status))
118                  return 1;
119   #else
120 <        longjmp(environment, (int)"Log in to zweihander.ccs.ucsb.edu to change password");
120 >        longjmp(environment, (int)"Log in to " MASTER " to change password");
121   #endif
122  
123          return 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines