Bug 133 - hard-coded umask(022) in ssh.c:main() too inflexible
Summary: hard-coded umask(022) in ssh.c:main() too inflexible
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: scp (show other bugs)
Version: -current
Hardware: ix86 Linux
: P2 enhancement
Assignee: Kevin Steves
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-02 06:18 AEDT by Wolfgang Spraul
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Spraul 2002-03-02 06:18:04 AEDT
There is a hardcoded umask(022) call right at the beginning of ssh.c:main(). 
The getuserattr() system does not exist in Linux, so there is no way to 
predefine other umasks for scp (scp does not evaluate .bashrc etc.).

E.g. I would like to define umask(002) to that uploaded files are group 
writable.

I understand the umask(022) might be important in some cases (setuid root), but 
I also think there should be a switch to turn that off and just continue with 
the previous process umask.

Either in the config file or as a command line switch.

Wolfgang
Comment 1 Kevin Steves 2002-03-31 06:37:13 AEST
need to think about this.  there are other permission
issues such as pid file created with 666 perms by sshd.
Comment 2 Damien Miller 2003-01-07 17:27:07 AEDT
Incorrect: scp does load .bashrc or whatever shell initalisation your shell uses
for non-interactive sessions. You can set umask there.
Comment 3 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED