Date: Tue, 25 Oct 2005 07:40:39 +0200 (CEST) From: Andre Albsmeier <Andre.Albsmeier@siemens.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/87966: [PATCH] introduce -A flag for newfs to enable ACLs Message-ID: <200510250540.j9P5ed5F033936@curry.mchp.siemens.de> Resent-Message-ID: <200510250550.j9P5oIOs029629@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 87966 >Category: bin >Synopsis: [PATCH] introduce -A flag for newfs to enable ACLs >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Oct 25 05:50:18 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Andre Albsmeier >Release: FreeBSD 5.4-STABLE i386 >Organization: >Environment: FreeBSD 5.4-STABLE #0: Mon Oct 17 17:53:08 CEST 2005 >Description: newfs lacks an option for creating ACL enabled filesystems (similar to the -U option for soft-updates) >How-To-Repeat: Try it :-) >Fix: --- ./newfs.c.ORI Tue Mar 1 09:57:07 2005 +++ ./newfs.c Tue Oct 25 07:31:41 2005 @@ -111,6 +111,7 @@ */ #define NFPI 4 +int Aflag; /* enable ACLs for file system */ int Lflag; /* add a volume label */ int Nflag; /* run without writing file system */ int Oflag = 2; /* file system format (1 => UFS1, 2 => UFS2) */ @@ -156,8 +157,11 @@ off_t mediasize; while ((ch = getopt(argc, argv, - "EL:NO:RS:T:Ua:b:c:d:e:f:g:h:i:lm:no:s:")) != -1) + "AEL:NO:RS:T:Ua:b:c:d:e:f:g:h:i:lm:no:s:")) != -1) switch (ch) { + case 'A': + Aflag = 1; + break; case 'E': Eflag++; break; --- ./mkfs.c.ORI Tue Mar 1 09:57:07 2005 +++ ./mkfs.c Tue Oct 25 07:30:47 2005 @@ -131,6 +131,8 @@ } sblock.fs_old_flags = FS_FLAGS_UPDATED; sblock.fs_flags = 0; + if (Aflag) + sblock.fs_flags |= FS_ACLS; if (Uflag) sblock.fs_flags |= FS_DOSOFTDEP; if (Lflag) --- ./newfs.h.ORI Tue Mar 1 09:57:07 2005 +++ ./newfs.h Tue Oct 25 07:31:32 2005 @@ -43,6 +43,7 @@ /* * variables set up by front end. */ +extern int Aflag; /* enable ACLs for file system */ extern int Lflag; /* add a volume label */ extern int Nflag; /* run mkfs without writing file system */ extern int Oflag; /* build UFS1 format file system */ --- ./newfs.8.ORI Tue Mar 1 09:57:07 2005 +++ ./newfs.8 Tue Oct 25 07:33:51 2005 @@ -36,7 +36,7 @@ .Nd construct a new UFS1/UFS2 file system .Sh SYNOPSIS .Nm -.Op Fl NUln +.Op Fl ANUln .Op Fl L Ar volname .Op Fl O Ar filesystem-type .Op Fl S Ar sector-size @@ -77,6 +77,8 @@ .Pp The following options define the general layout policies: .Bl -tag -width indent +.It Fl A +Enable ACLs on the new file system. .It Fl L Ar volname Add a volume label to the new file system. .It Fl N >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510250540.j9P5ed5F033936>