Increase size of space for ACL in "up" command.
[openafs.git] / src / venus / up.c
index f8ceb6a..9334f0f 100644 (file)
 
 #include <roken.h>
 
-#include <errno.h>
-#ifdef AFS_AIX32_ENV
-#include <signal.h>
-#undef _NONSTD_TYPES
-#endif
-#include <stdio.h>
-#include <unistd.h>
 #include <afs/afs_args.h>
-#include <sys/param.h>
-#ifdef AFS_SUN5_ENV
-#include <fcntl.h>
-#endif
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <sys/time.h>
 #define VIRTUE
 #define VICE
-#include <sys/ioctl.h>
 #include <afs/vice.h>
 #undef VIRTUE
 #undef VICE
-#include <sys/ioctl.h>
-#include <netdb.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-
 #include <afs/venus.h>
 #include <afs/sys_prototypes.h>
 #include <afs/afsutil.h>
@@ -50,7 +25,7 @@
 
 /* ************************************************************* */
 
-#define MAXACL 400
+#define MAXACL AFS_PIOCTL_MAXSIZE
 
 short verbose = 0;
 short renameTargets = 0;
@@ -321,6 +296,10 @@ Copy(char *file1, char *file2, short recursive, int level)
 
            /* Close the files */
            code = close(f1);
+           if (code < 0) {
+               perror("close ");
+               rcode = 1;
+           }
            code = close(f2);
            if (code < 0) {
                perror("close ");
@@ -439,7 +418,7 @@ Copy(char *file1, char *file2, short recursive, int level)
            fflush(stdout);
        }
 
-       n = readlink(file1, linkvalue, sizeof(linkvalue));
+       n = readlink(file1, linkvalue, sizeof(linkvalue)-1);
        if (n == -1) {
            fprintf(stderr, "Could not read symbolic link %s\n", file1);
            perror("read link ");
@@ -777,5 +756,4 @@ isMountPoint(char *name, struct ViceIoctl *blob)
             */
        }
     }
-    return 4;
 }