install correct aliases file
[unix-history] / usr / src / usr.sbin / chown / chgrp.c
index 3b3776d..f33d495 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)chgrp.c    5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)chgrp.c    5.9 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -93,7 +93,7 @@ ok:
                        continue;
                }
                if (rflag && ((stbuf.st_mode & S_IFMT) == S_IFDIR)) {
                        continue;
                }
                if (rflag && ((stbuf.st_mode & S_IFMT) == S_IFDIR)) {
-                       status += chownr(argv[c], stbuf.st_uid, gid);
+                       status += chownr(argv[c]);
                        continue;
                }
                if (chown(argv[c], -1, gid)) {
                        continue;
                }
                if (chown(argv[c], -1, gid)) {
@@ -115,12 +115,12 @@ isnumber(s)
        return (1);
 }
 
        return (1);
 }
 
-chownr(dir, uid, gid)
+chownr(dir)
        char *dir;
 {
        register DIR *dirp;
        register struct direct *dp;
        char *dir;
 {
        register DIR *dirp;
        register struct direct *dp;
-       register struct stat st;
+       struct stat st;
        char savedir[1024];
        int ecode;
 
        char savedir[1024];
        int ecode;
 
@@ -155,7 +155,7 @@ chownr(dir, uid, gid)
                        continue;
                }
                if ((st.st_mode & S_IFMT) == S_IFDIR) {
                        continue;
                }
                if ((st.st_mode & S_IFMT) == S_IFDIR) {
-                       ecode = chownr(dp->d_name, st.st_uid, gid);
+                       ecode = chownr(dp->d_name);
                        if (ecode)
                                break;
                        continue;
                        if (ecode)
                                break;
                        continue;