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

Comparing CCSAdmin/adduser.c (file contents):
Revision 566 by douglas, 2005-08-28T22:29:20-07:00 vs.
Revision 579 by douglas, 2005-11-14T17:52:38-08:00

# Line 4 | Line 4
4   //
5   // Add User
6  
7 + #define _BSD_SOURCE
8 +
9   #include <errno.h>
10   #include <sys/resource.h>
11   #include <sys/time.h>
# Line 18 | Line 20 | int main(int argc, char *argv[])
20   {
21          if (argc < 1)
22                  return 1;
23 +
24 +        umask(S_IWGRP | S_IWOTH);
25          
26          int exception;
27          jmp_buf environment;
# Line 137 | Line 141 | int main(int argc, char *argv[])
141          if (!entry)
142                  longjmp(environment, 1);
143  
144 <        check(mkdir(entry->pw_dir, 0755), environment);
144 >        check(mkdir(entry->pw_dir, S_IRWXU | S_IRWXG | S_IRWXO), environment);
145          check(chown(entry->pw_dir, entry->pw_uid, entry->pw_gid), environment);
146          check(chdir(entry->pw_dir), environment);
147  
148 <        FTS *traversal = fts_open((char *[]){ "/usr/share/skel", NULL }, FTS_LOGICAL | FTS_NOCHDIR, NULL);
148 >        FTS *traversal = fts_open((char *[]){ "/usr/share/skel", "/ccs/skel", NULL }, FTS_LOGICAL | FTS_NOCHDIR, NULL);
149  
150          if (!traversal)
151                  longjmp(environment, 1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines