Bug 16880

Summary: [PATCH] pw(8) hardcodes directory creation modes
Product: Base System Reporter: k.stevenson <k.stevenson>
Component: binAssignee: le
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.4-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
pw.patch none

Description k.stevenson 2000-02-21 15:50:01 UTC
	pw(8) ignores umask and always creates directories as mode 0755.  The
enclosed patch against CURRENT respects the parent process umask and adds a
-U option to specify the umask on the command line.

Fix: Patch against Current.  Patch has been moderately tested.

How-To-Repeat: 
	Set umask to something more restrictive than 022 and use pw to create
an account and home directory.
Comment 1 k.stevenson 2000-03-01 02:38:33 UTC
Attached is an updated patch which fixes some nits raised by Sheldon Hearn.

Regards,
--Keith Stevenson--

-- 
Keith Stevenson
System Programmer - Data Center Services - University of Louisville
k.stevenson@louisville.edu
PGP key fingerprint =  4B 29 A8 95 A8 82 EA A2  29 CE 68 DE FC EE B6 A0
Comment 2 nra freebsd_committer freebsd_triage 2000-07-20 04:39:05 UTC
Responsible Changed
From-To: freebsd-bugs->davidn

David seems to be working with pw(8) alot these days.
Comment 3 Doug Barton freebsd_committer freebsd_triage 2003-03-15 05:47:26 UTC
Responsible Changed
From-To: davidn->freebsd-bugs


davidn is no longer with us
Comment 4 le freebsd_committer freebsd_triage 2007-03-27 00:17:57 UTC
Responsible Changed
From-To: freebsd-bugs->le

Have a look at this.
Comment 5 dfilter service freebsd_committer freebsd_triage 2007-03-27 00:29:27 UTC
le          2007-03-26 23:29:20 UTC

  FreeBSD src repository

  Modified files:
    usr.sbin/pw          pw.8 pw.c pw_user.c 
  Log:
  Introduce the new option -M to allow to set the permissions of
  the user's newly created home directory.  If omitted, it's derived
  from the current umask.
  
  PR:      bin/16880, bin/83253 (partially), bin/104248
  MFC in:  1 month
  
  Revision  Changes    Path
  1.40      +12 -1     src/usr.sbin/pw/pw.8
  1.29      +2 -3      src/usr.sbin/pw/pw.c
  1.59      +17 -4     src/usr.sbin/pw/pw_user.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 le freebsd_committer freebsd_triage 2007-03-27 00:35:19 UTC
State Changed
From-To: open->patched

A patch similar to yours was committed to -CURRENT.
Comment 7 le freebsd_committer freebsd_triage 2007-05-04 18:37:16 UTC
State Changed
From-To: patched->closed

MFC happened.