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

Comparing CCSAdmin/chsh.c (file contents):
Revision 563 by douglas, 2005-08-28T01:55:06-07:00 vs.
Revision 568 by douglas, 2005-08-28T22:53:30-07:00

# Line 4 | Line 4
4   //
5   // Change Shell
6  
7 #include <sys/utsname.h>
8
7   #include "common.h"
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 57 | Line 60 | int main(int argc, char *argv[])
60  
61                  for (Shell shell = sh; shell <= custom; ++shell)
62                  {
63 <                        shell_regex = shell_regex ? realloc(shell_regex, size += strlen(shells[shell].name) + (shell != custom ? 2 : 1)) : calloc(size += strlen(shells[shell].name) + 2, 1);
63 >                        shell_regex = shell_regex ? realloc(shell_regex, size += strlen(shells[shell].name) + (shell != custom ? 1 : 0)) : calloc(size += strlen(shells[shell].name) + 2, 1);
64                          strlcat(shell_regex, shells[shell].name, size);
65  
66                          if (shell != custom)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines