From owner-svn-src-all@FreeBSD.ORG Sat Apr 5 20:11:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E43FB34C; Sat, 5 Apr 2014 20:11:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D09B399A; Sat, 5 Apr 2014 20:11:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35KBeeu064979; Sat, 5 Apr 2014 20:11:40 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35KBeWK064978; Sat, 5 Apr 2014 20:11:40 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201404052011.s35KBeWK064978@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 5 Apr 2014 20:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264171 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 20:11:41 -0000 Author: jilles Date: Sat Apr 5 20:11:40 2014 New Revision: 264171 URL: http://svnweb.freebsd.org/changeset/base/264171 Log: MFC r258794: chmod(2): Document S_ISVTX following SUSv3/SUSv4. S_ISTXT is non-standard. While here, also update fchmodat() standards entry to POSIX.1-2008. Modified: stable/10/lib/libc/sys/chmod.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/chmod.2 ============================================================================== --- stable/10/lib/libc/sys/chmod.2 Sat Apr 5 20:09:51 2014 (r264170) +++ stable/10/lib/libc/sys/chmod.2 Sat Apr 5 20:11:40 2014 (r264171) @@ -28,7 +28,7 @@ .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd December 1, 2013 .Dt CHMOD 2 .Os .Sh NAME @@ -139,21 +139,24 @@ defined in #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ -#ifndef __BSD_VISIBLE -#define S_ISTXT 0001000 /* sticky bit */ -#endif +#define S_ISVTX 0001000 /* sticky bit */ .Ed .Pp +The non-standard +.Dv S_ISTXT +is a synonym for +.Dv S_ISVTX . +.Pp The .Fx VM system totally ignores the sticky bit -.Pq Dv ISTXT +.Pq Dv S_ISVTX for executables. On UFS-based file systems (FFS, LFS) the sticky bit may only be set upon directories. .Pp If mode -.Dv ISTXT +.Dv S_ISVTX (the `sticky bit') is set on a directory, an unprivileged user may not delete or rename files of other users in that directory. @@ -296,12 +299,15 @@ The system call is expected to conform to .St -p1003.1-90 , except for the return of -.Er EFTYPE -and the use of -.Dv S_ISTXT . +.Er EFTYPE . +The +.Dv S_ISVTX +bit on directories is expected to conform to +.St -susv3 . The .Fn fchmodat -system call follows The Open Group Extended API Set 2 specification. +system call is expected to conform to +.St -p1003.1-2008 . .Sh HISTORY The .Fn chmod