From owner-p4-projects Sun Dec 29 13:50: 5 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AE5FD37B405; Sun, 29 Dec 2002 13:49:40 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B3B437B401 for ; Sun, 29 Dec 2002 13:49:40 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E7B143EC2 for ; Sun, 29 Dec 2002 13:49:39 -0800 (PST) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gBTLncfh054430 for ; Sun, 29 Dec 2002 13:49:38 -0800 (PST) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gBTLnbCC054427 for perforce@freebsd.org; Sun, 29 Dec 2002 13:49:37 -0800 (PST) Date: Sun, 29 Dec 2002 13:49:37 -0800 (PST) Message-Id: <200212292149.gBTLnbCC054427@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar Subject: PERFORCE change 22896 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=22896 Change 22896 by marcel@marcel_vaio on 2002/12/29 13:49:14 IFC @22895 Affected files ... .. //depot/projects/ia64/etc/rc.diskless1#6 integrate .. //depot/projects/ia64/etc/rc.diskless2#6 integrate .. //depot/projects/ia64/include/unistd.h#16 integrate .. //depot/projects/ia64/lib/libc/gen/ualarm.3#3 integrate .. //depot/projects/ia64/lib/libc/gen/ualarm.c#3 integrate .. //depot/projects/ia64/lib/libc/gen/usleep.3#2 integrate .. //depot/projects/ia64/lib/libc/gen/usleep.c#3 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl.3#4 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_delete.3#3 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_delete.c#3 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_dup.3#2 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_free.3#2 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_from_text.3#3 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_get.3#3 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_get.c#4 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_init.3#2 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_set.3#3 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_set.c#4 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_to_text.3#3 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_valid.3#2 integrate .. //depot/projects/ia64/lib/libc/posix1e/acl_valid.c#4 integrate .. //depot/projects/ia64/lib/libc_r/uthread/uthread_info.c#3 integrate .. //depot/projects/ia64/release/Makefile#32 integrate .. //depot/projects/ia64/release/i386/drivers.conf#11 integrate .. //depot/projects/ia64/sbin/fdisk/fdisk.c#13 integrate .. //depot/projects/ia64/sbin/swapon/Makefile#4 integrate .. //depot/projects/ia64/sbin/swapon/swapon.8#5 integrate .. //depot/projects/ia64/sbin/swapon/swapon.c#5 integrate .. //depot/projects/ia64/share/man/man5/Makefile#7 integrate .. //depot/projects/ia64/share/man/man5/msdos.5#2 delete .. //depot/projects/ia64/share/man/man5/msdosfs.5#1 branch .. //depot/projects/ia64/share/man/man7/development.7#2 integrate .. //depot/projects/ia64/sys/alpha/alpha/pmap.c#24 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi.c#26 integrate .. //depot/projects/ia64/sys/dev/an/if_aironet_ieee.h#4 integrate .. //depot/projects/ia64/sys/dev/an/if_an.c#14 integrate .. //depot/projects/ia64/sys/dev/an/if_an_pccard.c#4 integrate .. //depot/projects/ia64/sys/dev/an/if_an_pci.c#4 integrate .. //depot/projects/ia64/sys/dev/an/if_anreg.h#5 integrate .. //depot/projects/ia64/sys/dev/puc/pucdata.c#8 integrate .. //depot/projects/ia64/sys/dev/puc/pucvar.h#8 integrate .. //depot/projects/ia64/sys/fs/devfs/devfs_vnops.c#19 integrate .. //depot/projects/ia64/sys/fs/fifofs/fifo_vnops.c#15 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_vnops.c#10 integrate .. //depot/projects/ia64/sys/geom/geom_mbr.c#20 integrate .. //depot/projects/ia64/sys/i386/conf/GENERIC#27 integrate .. //depot/projects/ia64/sys/ia64/ia32/syscalls.master#13 integrate .. //depot/projects/ia64/sys/isa/fd.c#10 integrate .. //depot/projects/ia64/sys/kern/init_sysent.c#22 integrate .. //depot/projects/ia64/sys/kern/kern_acl.c#13 integrate .. //depot/projects/ia64/sys/kern/kern_conf.c#11 integrate .. //depot/projects/ia64/sys/kern/kern_intr.c#16 integrate .. //depot/projects/ia64/sys/kern/kern_subr.c#14 integrate .. //depot/projects/ia64/sys/kern/subr_smp.c#10 integrate .. //depot/projects/ia64/sys/kern/syscalls.c#23 integrate .. //depot/projects/ia64/sys/kern/syscalls.master#23 integrate .. //depot/projects/ia64/sys/kern/tty_pty.c#6 integrate .. //depot/projects/ia64/sys/kern/vfs_subr.c#31 integrate .. //depot/projects/ia64/sys/kern/vfs_vnops.c#23 integrate .. //depot/projects/ia64/sys/net/bpf.c#15 integrate .. //depot/projects/ia64/sys/netatm/atm_if.c#8 integrate .. //depot/projects/ia64/sys/nfsclient/nfs_bio.c#10 integrate .. //depot/projects/ia64/sys/nfsserver/nfs_serv.c#14 integrate .. //depot/projects/ia64/sys/security/mac_bsdextended/mac_bsdextended.c#6 integrate .. //depot/projects/ia64/sys/sparc64/include/tte.h#8 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/exception.S#9 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/genassym.c#17 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/interrupt.S#2 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/mp_exception.S#2 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/pmap.c#29 integrate .. //depot/projects/ia64/sys/sys/_iovec.h#1 branch .. //depot/projects/ia64/sys/sys/_mutex.h#6 integrate .. //depot/projects/ia64/sys/sys/acl.h#5 integrate .. //depot/projects/ia64/sys/sys/diskmbr.h#2 integrate .. //depot/projects/ia64/sys/sys/msg.h#5 integrate .. //depot/projects/ia64/sys/sys/mutex.h#10 integrate .. //depot/projects/ia64/sys/sys/signal.h#10 integrate .. //depot/projects/ia64/sys/sys/socket.h#12 integrate .. //depot/projects/ia64/sys/sys/syscall.h#22 integrate .. //depot/projects/ia64/sys/sys/syscall.mk#22 integrate .. //depot/projects/ia64/sys/sys/sysproto.h#24 integrate .. //depot/projects/ia64/sys/sys/uio.h#7 integrate .. //depot/projects/ia64/sys/sys/vnode.h#25 integrate .. //depot/projects/ia64/sys/vm/vm_fault.c#24 integrate .. //depot/projects/ia64/sys/vm/vm_kern.c#18 integrate .. //depot/projects/ia64/sys/vm/vm_map.c#37 integrate .. //depot/projects/ia64/sys/vm/vm_object.c#34 integrate .. //depot/projects/ia64/sys/vm/vm_object.h#13 integrate .. //depot/projects/ia64/sys/vm/vm_page.c#30 integrate .. //depot/projects/ia64/sys/vm/vm_pageout.c#25 integrate .. //depot/projects/ia64/sys/vm/vm_pager.h#5 integrate .. //depot/projects/ia64/sys/vm/vnode_pager.c#23 integrate .. //depot/projects/ia64/usr.bin/telnet/telnet.c#5 integrate .. //depot/projects/ia64/usr.sbin/ancontrol/ancontrol.8#7 integrate .. //depot/projects/ia64/usr.sbin/ancontrol/ancontrol.c#4 integrate .. //depot/projects/ia64/usr.sbin/boot0cfg/boot0cfg.c#4 integrate .. //depot/projects/ia64/usr.sbin/sysinstall/label.c#14 integrate Differences ... ==== //depot/projects/ia64/etc/rc.diskless1#6 (text+ko) ==== @@ -1,7 +1,7 @@ # Copyright (c) 1999-2002 Matt Dillion. Terms and conditions based on # the FreeBSD copyright as found at the base of the source distribution. # -# $FreeBSD: src/etc/rc.diskless1,v 1.18 2002/12/21 00:30:08 dillon Exp $ +# $FreeBSD: src/etc/rc.diskless1,v 1.19 2002/12/28 18:47:53 dillon Exp $ # # /etc/rc.diskless1 - general BOOTP startup # @@ -152,8 +152,9 @@ # NFS remount # if [ -d $j -a -f $j/diskless_remount ]; then - mount_nfs `/bin/cat $j/diskless_remount` $j - chkerr $? "mount_nfs `/bin/cat $j/diskless_remount` $j" + nfspt=`/bin/cat $j/diskless_remount` + mount_nfs $nfspt $j + chkerr $? "mount_nfs $nfspt $j" fi done done ==== //depot/projects/ia64/etc/rc.diskless2#6 (text+ko) ==== @@ -22,7 +22,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.diskless2,v 1.20 2002/10/01 13:29:45 ru Exp $ +# $FreeBSD: src/etc/rc.diskless2,v 1.21 2002/12/28 18:47:53 dillon Exp $ # # @@ -55,16 +55,36 @@ . /etc/rc.conf fi -echo "+++ mount_md of /var" -mount_md ${varsize:=32m} /var 1 +# If we do not have a writable /var, create a memory +# filesystem for /var. We don't have /usr yet so +# use mkdir instead of touch to test. We want mount +# to record its mounts so we have to make sure /var/db +# exists before doing the mount -a. +# +if (/bin/mkdir /var/.diskless 2> /dev/null); then + rmdir /var/.diskless +else + echo "+++ mount_md of /var" + mount_md ${varsize:=32m} /var 1 +fi + +if [ ! -d /var/db ]; then + mkdir /var/db +fi + +# Now we need the rest of our mounts, particularly /usr +# +mount -a # chown and chgrp are in /usr +# Populate /var +# echo "+++ populate /var using /etc/mtree/BSD.var.dist" -/usr/sbin/mtree -deU -f /etc/mtree/BSD.var.dist -p /var +/usr/sbin/mtree -deU -f /etc/mtree/BSD.var.dist -p /var > /dev/null case ${sendmail_enable} in [Nn][Oo][Nn][Ee]) ;; *) - /usr/sbin/mtree -deU -f /etc/mtree/BSD.sendmail.dist -p / + /usr/sbin/mtree -deU -f /etc/mtree/BSD.sendmail.dist -p / > /dev/null ;; esac @@ -77,34 +97,42 @@ echo "+++ create lastlog" /usr/bin/touch /var/log/lastlog -mount -a # chown and chgrp are in /usr - -# Since we are starting with a very fresh /etc on an MFS: -if [ -d /conf/default/etc ]; then - newaliases -fi +# Make sure our aliases database is uptodate, the aliases may have +# been overriden in /conf. +# +/usr/bin/newaliases -# # XXX make sure to create one dir for each printer as requested by lpd # - -# If /tmp is a symlink, assume it points to somewhere writable, like -# /var/tmp, otherwise, use a small memory filesystem for /tmp. +# If we do not have a writable /tmp, create a memory +# filesystem for /tmp. If /tmp is a symlink (e.g. to /var/tmp, +# then it should already be writable). # -# XXX: mtree runs too early to create any directories needed in /tmp, -# so if /var/tmp == /tmp, then you don't get a vi.recover. -# -if [ ! -L /tmp ]; then - mount_md ${tmpsize:=64m} /tmp 2 - chmod 01777 /tmp +if (/bin/mkdir /tmp/.diskless 2> /dev/null); then + rmdir /tmp/.diskless +else + if [ -h /tmp ]; then + echo "*** /tmp is a symlink to a non-writable area!" + echo "dropping into shell, ^D to continue anyway." + /bin/sh + else + mount_md ${tmpsize:=20480} /tmp 2 + chmod 01777 /tmp + fi fi if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then # we have DEVFS, no worries... true +elif (/bin/mkdir /dev/.diskless 2> /dev/null); then + # if /dev is writable assume it has already been populated + # via rc.diskless1 + # + rmdir /dev/.diskless else - # extract a list of device entries, then copy them to a writable fs (cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp mount_md 4096 /dev 3 512 (cd /; cpio -i -H newc -d < /tmp/dev.tmp) + rm -f /tmp/dev.tmp fi + ==== //depot/projects/ia64/include/unistd.h#16 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)unistd.h 8.12 (Berkeley) 4/27/95 - * $FreeBSD: src/include/unistd.h,v 1.65 2002/12/15 19:17:56 dillon Exp $ + * $FreeBSD: src/include/unistd.h,v 1.66 2002/12/29 01:07:55 mike Exp $ */ #ifndef _UNISTD_H_ @@ -47,6 +47,16 @@ #define _GID_T_DECLARED #endif +#ifndef _OFF_T_DECLARED +typedef __off_t off_t; +#define _OFF_T_DECLARED +#endif + +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; +#define _PID_T_DECLARED +#endif + #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED @@ -58,13 +68,14 @@ #endif #ifndef _UID_T_DECLARED -typedef __uid_t_ uid_t; +typedef __uid_t uid_t; #define _UID_T_DECLARED #endif -/* - * XXX missing type definitions for off_t, pid_t and useconds_t. - */ +#ifndef _USECONDS_T_DECLARED +typedef __useconds_t useconds_t; +#define _USECONDS_T_DECLARED +#endif #define STDIN_FILENO 0 /* standard input file descriptor */ #define STDOUT_FILENO 1 /* standard output file descriptor */ @@ -427,8 +438,8 @@ int setreuid(uid_t, uid_t); /* void swab(const void * __restrict, void * __restrict, ssize_t); */ void sync(void); -unsigned int ualarm(unsigned int, unsigned int); -int usleep(unsigned int); +useconds_t ualarm(useconds_t, useconds_t); +int usleep(useconds_t); pid_t vfork(void); /* See comment at ftruncate() above. */ ==== //depot/projects/ia64/lib/libc/gen/ualarm.3#3 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)ualarm.3 8.2 (Berkeley) 4/19/94 -.\" $FreeBSD: src/lib/libc/gen/ualarm.3,v 1.16 2002/12/18 13:33:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/ualarm.3,v 1.17 2002/12/29 00:59:09 mike Exp $ .\" .Dd April 19, 1994 .Dt UALARM 3 @@ -42,8 +42,8 @@ .Lb libc .Sh SYNOPSIS .In unistd.h -.Ft u_int -.Fn ualarm "u_int microseconds" "u_int interval" +.Ft useconds_t +.Fn ualarm "useconds_t microseconds" "useconds_t interval" .Sh DESCRIPTION .Bf -symbolic This is a simplified interface to ==== //depot/projects/ia64/lib/libc/gen/ualarm.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)ualarm.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/ualarm.c,v 1.3 2002/02/01 01:08:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/ualarm.c,v 1.4 2002/12/29 00:59:09 mike Exp $"); #include #include @@ -47,10 +47,10 @@ * If ``reload'' is non-zero, keep generating SIGALRM * every ``reload'' microseconds after the first signal. */ -unsigned +useconds_t ualarm(usecs, reload) - unsigned usecs; - unsigned reload; + useconds_t usecs; + useconds_t reload; { struct itimerval new, old; ==== //depot/projects/ia64/lib/libc/gen/usleep.3#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)usleep.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/gen/usleep.3,v 1.17 2001/10/01 16:08:51 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/usleep.3,v 1.18 2002/12/29 00:59:09 mike Exp $ .\" .Dd February 13, 1998 .Dt USLEEP 3 @@ -43,7 +43,7 @@ .Sh SYNOPSIS .In unistd.h .Ft int -.Fn usleep "unsigned int microseconds" +.Fn usleep "useconds_t microseconds" .Sh DESCRIPTION The .Fn usleep ==== //depot/projects/ia64/lib/libc/gen/usleep.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)usleep.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/usleep.c,v 1.27 2002/02/01 00:57:29 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/usleep.c,v 1.28 2002/12/29 00:59:09 mike Exp $"); #include "namespace.h" #include @@ -44,7 +44,7 @@ int usleep(useconds) - unsigned int useconds; + useconds_t useconds; { struct timespec time_to_sleep; ==== //depot/projects/ia64/lib/libc/posix1e/acl.3#4 (text+ko) ==== @@ -2,6 +2,8 @@ .\" Copyright (c) 2000, 2001, 2002 Robert N. M. Watson .\" All rights reserved. .\" +.\" This software was developed by Robert Watson for the TrustedBSD Project. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -23,9 +25,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/acl.3,v 1.20 2002/12/27 12:15:28 schweikh Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/acl.3,v 1.21 2002/12/29 20:47:05 rwatson Exp $ .\" -.Dd January 28, 2000 +.Dd December 18, 2002 .Dt ACL 3 .Os .Sh NAME @@ -82,8 +84,10 @@ and may be used to create an empty entry in an ACL. .It Xo .Fn acl_delete_def_file , +.Fn acl_delete_def_link_np , +.Fn acl_delete_fd_np , .Fn acl_delete_file_np , -.Fn acl_delete_fd_np +.Fn acl_delete_link_np .Xc These functions are described in .Xr acl_delete 3 , @@ -114,9 +118,10 @@ .Xr acl_get_entry 3 , and may be used to retrieve a designated ACL entry from an ACL. .It Xo +.Fn acl_get_fd , +.Fn acl_get_fd_np , .Fn acl_get_file , -.Fn acl_get_fd , -.Fn acl_get_fd_np +.Fn acl_get_link_np .Xc These functions are described in .Xr acl_get 3 , @@ -138,9 +143,10 @@ .Xr acl_init 3 , and may be used to allocate a fresh (empty) ACL structure. .It Xo +.Fn acl_set_fd , +.Fn acl_set_fd_np , .Fn acl_set_file , -.Fn acl_set_fd , -.Fn acl_set_fd_np +.Fn acl_set_link_np .Xc These functions are described in .Xr acl_set 3 , @@ -163,8 +169,9 @@ and may be used to generate a text-form of a POSIX.1e semantics ACL. .It Xo .Fn acl_valid , +.Fn acl_valid_fd_np , .Fn acl_valid_file_np , -.Fn acl_valid_fd_np +.Fn acl_valid_link_np .Xc These functions are described in .Xr acl_valid 3 , ==== //depot/projects/ia64/lib/libc/posix1e/acl_delete.3#3 (text+ko) ==== @@ -1,7 +1,9 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2002 Robert N. M. Watson .\" All rights reserved. .\" +.\" This software was developed by Robert Watson for the TrustedBSD Project. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -23,15 +25,17 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/acl_delete.3,v 1.14 2002/12/18 12:45:09 ru Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/acl_delete.3,v 1.15 2002/12/29 20:47:05 rwatson Exp $ .\" -.Dd January 28, 2000 +.Dd December 29, 2002 .Dt ACL_DELETE 3 .Os .Sh NAME .Nm acl_delete_def_file , +.Nm acl_delete_def_link_np , .Nm acl_delete_fd_np , .Nm acl_delete_file_np +.Nm acl_delete_link_np .Nd delete an ACL from a file .Sh LIBRARY .Lb libc @@ -41,23 +45,35 @@ .Ft int .Fn acl_delete_def_file "const char *path_p" .Ft int +.Fn acl_delete_def_link_np "const char *path_p" +.Ft int +.Fn acl_delete_fd_np "int filedes" "acl_type_t type" +.Ft int .Fn acl_delete_file_np "const char *path_p" "acl_type_t type" .Ft int -.Fn acl_delete_fd_np "int filedes" "acl_type_t type" +.Fn acl_delete_link_np "const char *path_p" "acl_type_t type" .Sh DESCRIPTION The .Fn acl_delete_def_file , +.Fn acl_delete_def_link_np , +.Fn acl_delete_fd_np , .Fn acl_delete_file_np , and -.Fn acl_delete_fd_np +.Fn acl_delete_link_np each allow the deletion of an ACL from a file. The .Fn acl_delete_def_file function is a POSIX.1e call that deletes the default ACL from a file (normally a -directory) by name; the other two calls are non-portable extensions that -allow deleting of arbitrary ACL types from a file/directory by either path -name, or by file descriptor. +directory) by name; the remainder of the calls are non-portable extensions +that permit the deletion of arbitrary ACL types from a file/directory +either by path name or file descriptor. +The +.Fn _file +variations follow a symlink if it occurs in the last segment of the +path name; the +.Fn _linke +variations operate on the symlink itself. .Sh IMPLEMENTATION NOTES .Fx Ns 's support for POSIX.1e interfaces and features is still under @@ -120,5 +136,3 @@ and development continues. .Sh AUTHORS .An Robert N M Watson -.Sh BUGS -These features are not yet fully implemented. ==== //depot/projects/ia64/lib/libc/posix1e/acl_delete.c#3 (text+ko) ==== @@ -1,7 +1,9 @@ /*- - * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson + * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson * All rights reserved. * + * This software was developed by Robert Watson for the TrustedBSD Project. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -28,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/posix1e/acl_delete.c,v 1.7 2002/03/22 21:52:38 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/posix1e/acl_delete.c,v 1.8 2002/12/29 20:47:05 rwatson Exp $"); #include #include "namespace.h" @@ -43,7 +45,13 @@ return (__acl_delete_file(path_p, ACL_TYPE_DEFAULT)); } +int +acl_delete_def_link_np(const char *path_p) +{ + return (__acl_delete_link(path_p, ACL_TYPE_DEFAULT)); +} + int acl_delete_file_np(const char *path_p, acl_type_t type) { @@ -51,6 +59,13 @@ return (__acl_delete_file(path_p, type)); } +int +acl_delete_link_np(const char *path_p, acl_type_t type) +{ + + return (__acl_delete_link(path_p, type)); +} + int acl_delete_fd_np(int filedes, acl_type_t type) ==== //depot/projects/ia64/lib/libc/posix1e/acl_dup.3#2 (text+ko) ==== @@ -1,7 +1,9 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2002 Robert N. M. Watson .\" All rights reserved. .\" +.\" This software was developed by Robert Watson for the TrustedBSD Project. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -23,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/acl_dup.3,v 1.11 2001/10/01 16:08:56 ru Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/acl_dup.3,v 1.12 2002/12/29 20:52:42 rwatson Exp $ .\" .Dd January 28, 2000 .Dt ACL_DUP 3 @@ -102,5 +104,3 @@ and development continues. .Sh AUTHORS .An Robert N M Watson -.Sh BUGS -These features are not yet fully implemented. ==== //depot/projects/ia64/lib/libc/posix1e/acl_free.3#2 (text+ko) ==== @@ -1,7 +1,9 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2002 Robert N. M. Watson .\" All rights reserved. .\" +.\" This software was developed by Robert Watson for the TrustedBSD Project. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -23,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/acl_free.3,v 1.11 2001/10/01 16:08:56 ru Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/acl_free.3,v 1.12 2002/12/29 20:52:42 rwatson Exp $ .\" .Dd January 28, 2000 .Dt ACL_FREE 3 @@ -83,5 +85,3 @@ and development continues. .Sh AUTHORS .An Robert N M Watson -.Sh BUGS -These features are not yet fully implemented. ==== //depot/projects/ia64/lib/libc/posix1e/acl_from_text.3#3 (text+ko) ==== @@ -1,7 +1,9 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2002 Robert N. M. Watson .\" All rights reserved. .\" +.\" This software was developed by Robert Watson for the TrustedBSD Project. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -23,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/acl_from_text.3,v 1.14 2002/12/18 12:45:09 ru Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/acl_from_text.3,v 1.15 2002/12/29 20:52:42 rwatson Exp $ .\" .Dd January 28, 2000 .Dt ACL_FROM_TEXT 3 @@ -101,8 +103,6 @@ .Sh AUTHORS .An Robert N M Watson .Sh BUGS -These features are not yet fully implemented. -.Pp The .Fn acl_from_text and ==== //depot/projects/ia64/lib/libc/posix1e/acl_get.3#3 (text+ko) ==== @@ -1,7 +1,9 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2002 Robert N. M. Watson .\" All rights reserved. .\" +.\" This software was developed by Robert Watson for the TrustedBSD Project. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -23,15 +25,16 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/acl_get.3,v 1.14 2002/12/18 12:45:09 ru Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/acl_get.3,v 1.15 2002/12/29 20:47:05 rwatson Exp $ .\" -.Dd January 28, 2000 +.Dd December 29, 2002 .Dt ACL_GET 3 .Os .Sh NAME .Nm acl_get_fd , .Nm acl_get_fd_np , -.Nm acl_get_file +.Nm acl_get_file , +.Nm acl_get_link_np .Nd get an ACL for a file .Sh LIBRARY .Lb libc @@ -39,23 +42,21 @@ .In sys/types.h .In sys/acl.h .Ft acl_t -.Fn acl_get_file "const char *path_p" "acl_type_t type" -.Ft acl_t .Fn acl_get_fd "int fd" .Ft acl_t .Fn acl_get_fd_np "int fd" "acl_type_t type" +.Ft acl_t +.Fn acl_get_file "const char *path_p" "acl_type_t type" +.Ft acl_t +.Fn acl_get_link_np "const char *path_p" "acl_type_t type" .Sh DESCRIPTION The +.Fn acl_get_fd , .Fn acl_get_file , -.Fn acl_get_fd , -and +.Fn acl_get_link_np , .Fn acl_get_fd_np each allow the retrieval of an ACL from a file. The -.Fn acl_get_file -function -is a POSIX.1e call that allows the retrieval of a -specified type of ACL from a file by name; .Fn acl_get_fd is a POSIX.1e call that allows the retrieval of an ACL of type ACL_TYPE_ACCESS @@ -66,8 +67,16 @@ is a non-portable form of .Fn acl_get_fd that allows the retrieval of any type of ACL from a file descriptor. +.Fn acl_get_file +is a POSIX.1e call that allows the retrieval of a +specified type of ACL from a file by name; +.Fn acl_get_link_np +is a non-portable variation on +.Fn acl_get_file +which does not follow a symlink if the target of the call is a +symlink. .Pp -This function may cause memory to be allocated. The caller should free +These functions may cause memory to be allocated. The caller should free any releasable memory, when the new ACL is no longer required, by calling .Xr acl_free 3 with the @@ -139,5 +148,3 @@ and development continues. .Sh AUTHORS .An Robert N M Watson -.Sh BUGS -These features are not yet fully implemented. ==== //depot/projects/ia64/lib/libc/posix1e/acl_get.c#4 (text+ko) ==== @@ -1,7 +1,9 @@ /*- - * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson + * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson * All rights reserved. * + * This software was developed by Robert Watson for the TrustedBSD Project. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,9 +26,11 @@ * SUCH DAMAGE. */ /* - * acl_get_file - syscall wrapper for retrieving ACL by filename * acl_get_fd - syscall wrapper for retrieving access ACL by fd * acl_get_fd_np - syscall wrapper for retrieving ACL by fd (non-POSIX) + * acl_get_file - syscall wrapper for retrieving ACL by filename + * acl_get_link_np - syscall wrapper for retrieving ACL by filename (NOFOLLOW) + * (non-POSIX) * acl_get_perm_np() checks if a permission is in the specified * permset (non-POSIX) * acl_get_permset() returns the permission set in the ACL entry @@ -35,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/posix1e/acl_get.c,v 1.11 2002/03/22 21:52:38 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/posix1e/acl_get.c,v 1.12 2002/12/29 20:47:05 rwatson Exp $"); #include #include "namespace.h" @@ -66,6 +70,25 @@ } acl_t +acl_get_link_np(const char *path_p, acl_type_t type) +{ + acl_t aclp; + int error; + + aclp = acl_init(ACL_MAX_ENTRIES); + if (aclp == NULL) + return (NULL); + + error = __acl_get_link(path_p, type, &aclp->ats_acl); + if (error) { + acl_free(aclp); + return (NULL); + } + + return (aclp); +} + +acl_t acl_get_fd(int fd) { acl_t aclp; ==== //depot/projects/ia64/lib/libc/posix1e/acl_init.3#2 (text+ko) ==== @@ -1,7 +1,9 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2002 Robert N. M. Watson .\" All rights reserved. .\" +.\" This software was developed by Robert Watson for the TrustedBSD Project. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -23,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/acl_init.3,v 1.12 2001/10/01 16:08:57 ru Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/acl_init.3,v 1.13 2002/12/29 20:52:42 rwatson Exp $ .\" .Dd January 28, 2000 .Dt ACL_INIT 3 @@ -101,5 +103,3 @@ and development continues. .Sh AUTHORS .An Robert N M Watson -.Sh BUGS -These features are not yet fully implemented. ==== //depot/projects/ia64/lib/libc/posix1e/acl_set.3#3 (text+ko) ==== @@ -1,7 +1,9 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2002 Robert N. M. Watson .\" All rights reserved. .\" +.\" This software was developed by Robert Watson for the TrustedBSD Project. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -23,15 +25,16 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/acl_set.3,v 1.13 2002/01/07 22:46:14 jedgar Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/acl_set.3,v 1.14 2002/12/29 20:50:30 rwatson Exp $ .\" -.Dd January 28, 2000 +.Dd December 29, 2002 .Dt ACL_SET 3 .Os .Sh NAME .Nm acl_set_fd , .Nm acl_set_fd_np , -.Nm acl_set_file +.Nm acl_set_file , +.Nm acl_set_link_np .Nd set an ACL for a file .Sh LIBRARY .Lb libc @@ -39,29 +42,36 @@ .In sys/types.h .In sys/acl.h .Ft int -.Fn acl_set_file "const char *path_p" "acl_type_t type" "acl_t acl" -.Ft int .Fn acl_set_fd "int fd" "acl_t acl" .Ft int .Fn acl_set_fd_np "int fd" "acl_t acl" "acl_type_t type" +.Ft int +.Fn acl_set_file "const char *path_p" "acl_type_t type" "acl_t acl" +.Ft int +.Fn acl_set_link_np "const char *path_p" "acl_type_t type" "acl_t acl" .Sh DESCRIPTION The +.Fn acl_set_fd , +.Fn acl_set_fd_np , .Fn acl_set_file , -.Fn acl_set_fd , and -.Fn acl_set_fd_np +.Fn acl_set_link_np , each associate an ACL with an object referred to by .Va fd or .Va path_p . -All except .Fn acl_set_fd_np -are POSIX.1e calls-- +and +.Fn acl_set_link_np +are not POSIX.1e calls. .Fn acl_set_fd allows only the setting of ACLs of type ACL_TYPE_ACCESS where as .Fn acl_set_fd_np allows the setting of ACLs of any type. +.Fn acl_set_link_np +acts on a symlink rather than its target, if the target of the +path is a symlink. .Sh IMPLEMENTATION NOTES .Fx Ns 's support for POSIX.1e interfaces and features is still under @@ -125,5 +135,3 @@ and development continues. .Sh AUTHORS .An Robert N M Watson -.Sh BUGS -These features are not yet fully implemented. ==== //depot/projects/ia64/lib/libc/posix1e/acl_set.c#4 (text+ko) ==== @@ -1,7 +1,9 @@ /*- - * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson + * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson * All rights reserved. * + * This software was developed by Robert Watson for the TrustedBSD Project. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -28,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/posix1e/acl_set.c,v 1.11 2002/03/22 21:52:38 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/posix1e/acl_set.c,v 1.12 2002/12/29 20:47:05 rwatson Exp $"); #include #include "namespace.h" @@ -70,6 +72,28 @@ } int +acl_set_link_np(const char *path_p, acl_type_t type, acl_t acl) +{ + int error; + + if (acl == NULL || path_p == NULL) { + errno = EINVAL; + return (-1); + } + if (_posix1e_acl(acl, type)) { + error = _posix1e_acl_sort(acl); + if (error) { + errno = error; + return (-1); + } + } + + acl->ats_cur_entry = 0; + + return (__acl_set_link(path_p, type, &acl->ats_acl)); +} + +int acl_set_fd(int fd, acl_t acl) { >>> TRUNCATED FOR MAIL (1000 lines) <<< To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message