From owner-p4-projects@FreeBSD.ORG Mon Jun 30 20:04:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F3C2E106566C; Mon, 30 Jun 2008 20:04:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C893106567B for ; Mon, 30 Jun 2008 20:04:45 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8B2508FC0C for ; Mon, 30 Jun 2008 20:04:45 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m5UK4jDT030890 for ; Mon, 30 Jun 2008 20:04:45 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m5UK4jVM030888 for perforce@freebsd.org; Mon, 30 Jun 2008 20:04:45 GMT (envelope-from trasz@freebsd.org) Date: Mon, 30 Jun 2008 20:04:45 GMT Message-Id: <200806302004.m5UK4jVM030888@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Cc: Subject: PERFORCE change 144381 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2008 20:04:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=144381 Change 144381 by trasz@trasz_traszkan on 2008/06/30 20:04:27 Backout more stuff. Affected files ... .. //depot/projects/soc2008/trasz_nfs4acl/bin/getfacl/Makefile#3 edit .. //depot/projects/soc2008/trasz_nfs4acl/bin/getfacl/ace.c#3 delete .. //depot/projects/soc2008/trasz_nfs4acl/bin/getfacl/getfacl.1#4 edit .. //depot/projects/soc2008/trasz_nfs4acl/bin/getfacl/getfacl.c#4 edit Differences ... ==== //depot/projects/soc2008/trasz_nfs4acl/bin/getfacl/Makefile#3 (text+ko) ==== @@ -1,6 +1,5 @@ # $FreeBSD: src/bin/getfacl/Makefile,v 1.6 2001/12/04 01:57:44 obrien Exp $ PROG= getfacl -SRCS= getfacl.c ace.c .include ==== //depot/projects/soc2008/trasz_nfs4acl/bin/getfacl/getfacl.1#4 (text+ko) ==== @@ -38,7 +38,7 @@ .Nd get ACL information .Sh SYNOPSIS .Nm -.Op Fl dhqv +.Op Fl dhq .Op Ar .Sh DESCRIPTION The @@ -68,8 +68,6 @@ Do not write commented information about file name and ownership. This is useful when dealing with filenames with unprintable characters. -.It Fl v -For the NFSv4 ACLs, return the ACL in verbose form. .El .Pp The following operand is available: ==== //depot/projects/soc2008/trasz_nfs4acl/bin/getfacl/getfacl.c#4 (text+ko) ==== @@ -54,7 +54,7 @@ usage(void) { - fprintf(stderr, "getfacl [-dhqv] [file ...]\n"); + fprintf(stderr, "getfacl [-dhq] [file ...]\n"); } static char * @@ -174,24 +174,8 @@ return(acl); } -int load_aces(char *path, ace_t *acesp[], int *nentriesp); -int print_aces_aligned_nicely(const ace_t *ace, int nentries, int compact); - -int -print_nfsv4_acl(char *path, int verbose) -{ - int ret, nentries = -1; - ace_t *aces; - - ret = load_aces(path, &aces, &nentries); - if (ret) - return (-1); - - return (print_aces_aligned_nicely(aces, nentries, !verbose)); -} - static int -print_acl(char *path, acl_type_t type, int hflag, int qflag, int vflag) +print_acl(char *path, acl_type_t type, int hflag, int qflag) { struct stat sb; acl_t acl; @@ -216,9 +200,6 @@ printf("# file: %s\n# owner: %s\n# group: %s\n", path, getuname(sb.st_uid), getgname(sb.st_gid)); - if (pathconf(path, _ACL_ACE_ENABLED)) - return (print_nfsv4_acl(path, vflag)); - if (hflag) acl = acl_get_link_np(path, type); else @@ -253,7 +234,7 @@ } static int -print_acl_from_stdin(acl_type_t type, int hflag, int qflag, int vflag) +print_acl_from_stdin(acl_type_t type, int hflag, int qflag) { char *p, pathname[PATH_MAX]; int carried_error = 0; @@ -261,7 +242,7 @@ while (fgets(pathname, (int)sizeof(pathname), stdin)) { if ((p = strchr(pathname, '\n')) != NULL) *p = '\0'; - if (print_acl(pathname, type, hflag, qflag, vflag) == -1) { + if (print_acl(pathname, type, hflag, qflag) == -1) { carried_error = -1; } } @@ -275,12 +256,11 @@ acl_type_t type = ACL_TYPE_ACCESS; int carried_error = 0; int ch, error, i; - int hflag, qflag, vflag; + int hflag, qflag; hflag = 0; qflag = 0; - vflag = 0; - while ((ch = getopt(argc, argv, "dhqv")) != -1) + while ((ch = getopt(argc, argv, "dhq")) != -1) switch(ch) { case 'd': type = ACL_TYPE_DEFAULT; @@ -291,9 +271,6 @@ case 'q': qflag = 1; break; - case 'v': - vflag = 1; - break; default: usage(); return(-1); @@ -302,17 +279,17 @@ argv += optind; if (argc == 0) { - error = print_acl_from_stdin(type, hflag, qflag, vflag); + error = print_acl_from_stdin(type, hflag, qflag); return(error ? 1 : 0); } for (i = 0; i < argc; i++) { if (!strcmp(argv[i], "-")) { - error = print_acl_from_stdin(type, hflag, qflag, vflag); + error = print_acl_from_stdin(type, hflag, qflag); if (error == -1) carried_error = -1; } else { - error = print_acl(argv[i], type, hflag, qflag, vflag); + error = print_acl(argv[i], type, hflag, qflag); if (error == -1) carried_error = -1; }