From vladimir@math.uic.edu Tue Sep 21 21:01:35 1999
Return-Path: <vladimir@math.uic.edu>
Received: from galileo.math.uic.edu (galileo.math.uic.edu [131.193.179.162])
	by hub.freebsd.org (Postfix) with SMTP id 65FDB15E0F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 21 Sep 1999 21:01:33 -0700 (PDT)
	(envelope-from vladimir@math.uic.edu)
Received: (qmail 23343 invoked by uid 31415); 22 Sep 1999 04:01:39 -0000
Message-Id: <19990922040139.23342.qmail@galileo.math.uic.edu>
Date: 22 Sep 1999 04:01:39 -0000
From: vladimir@math.uic.edu
Reply-To: vladimir@math.uic.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: /usr/bin/chmod +t and /usr/bin/chmod +s have no effect
X-Send-Pr-Version: 3.2

>Number:         13889
>Category:       bin
>Synopsis:       /usr/bin/chmod +t and /usr/bin/chmod +s have no effect
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 21 21:10:01 PDT 1999
>Closed-Date:    Tue Sep 28 00:27:45 PDT 1999
>Last-Modified:  Tue Sep 28 00:28:44 PDT 1999
>Originator:     Vladimir V. Egorin
>Release:        FreeBSD 3.3-STABLE i386
>Organization:
Department of Mathematics, University of Illinois
>Environment:

	

>Description:

	/usr/bin/chmod +t filename and /usr/bin/chmod +s filename have no effect
	on the file permission and do not give any error messages.   I believe
	the effect should be setting the sticky bit and setuid bit on the file
	mode resp.    

>How-To-Repeat:

	>touch /tmp/file
	>ls -l /tmp/file
	-rw-r--r--  1 vladimir  wheel  0 Sep 21 22:59 /tmp/file
	>chmod +t /tmp/file
	>ls -l /tmp/file
	-rw-r--r--  1 vladimir  wheel  0 Sep 21 22:59 /tmp/file


>Fix:
	
	Looks like /usr/src/lib/libc/gen/setmode.c is at fault, no fix
	known.


>Release-Note:
>Audit-Trail:

From: Ruslan Ermilov <ru@FreeBSD.ORG>
To: vladimir@math.uic.edu
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/13889: /usr/bin/chmod +t and /usr/bin/chmod +s have no effect
Date: Wed, 22 Sep 1999 10:34:25 +0300

 On Wed, Sep 22, 1999 at 04:01:39AM -0000, vladimir@math.uic.edu wrote:
 > 
 > >Description:
 > 
 > 	/usr/bin/chmod +t filename and /usr/bin/chmod +s filename have no effect
 > 	on the file permission and do not give any error messages.   I believe
 > 	the effect should be setting the sticky bit and setuid bit on the file
 > 	mode resp.    
 > 
 > >How-To-Repeat:
 > 
 > 	>touch /tmp/file
 > 	>ls -l /tmp/file
 > 	-rw-r--r--  1 vladimir  wheel  0 Sep 21 22:59 /tmp/file
 > 	>chmod +t /tmp/file
 > 	>ls -l /tmp/file
 > 	-rw-r--r--  1 vladimir  wheel  0 Sep 21 22:59 /tmp/file
 > 
 The sticky bit is ignored for regular files, see sticky(8) and chmod(2).
 
 To set set-user-ID or set-group-ID on a file:
 
 $ touch /tmp/file
 $ ls -l /tmp/file
 -rw-r--r--  1 ru  wheel  0 Sep 22 10:32 /tmp/file
 $ chmod u+s /tmp/file
 $ ls -l /tmp/file
 -rwSr--r--  1 ru  wheel  0 Sep 22 10:32 /tmp/file
 $ chmod g+s /tmp/file
 $ ls -l /tmp/file
 -rwSr-Sr--  1 ru  wheel  0 Sep 22 10:32 /tmp/file
 $ chmod ug+x /tmp/file
 $ ls -l /tmp/file
 -rwsr-sr--  1 ru  wheel  0 Sep 22 10:32 /tmp/file
 
 
 Can I close this PR?
 
 
 Cheers,
 -- 
 Ruslan Ermilov		Sysadmin and DBA of the
 ru@ucb.crimea.ua	United Commercial Bank,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.247.647	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 
State-Changed-From-To: open->feedback 
State-Changed-By: ru 
State-Changed-When: Wed Sep 22 06:04:00 PDT 1999 
State-Changed-Why:  
Fixed in -current, in src/lib/libc/gen/setmode.c,v 1.4 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Wed Sep 22 06:04:00 PDT 1999 
Responsible-Changed-Why:  
So I remember to MFC. 
State-Changed-From-To: feedback->closed 
State-Changed-By: ru 
State-Changed-When: Tue Sep 28 00:27:45 PDT 1999 
State-Changed-Why:  
Fixed in -stable, in src/lib/libc/gen/setmode.c,v 1.3.4.1 
>Unformatted:
