[SSSD] [PATCHES] Fixes for issues in SSH-related code found by coverity

Jan Cholasta jcholast at redhat.com
Wed Mar 7 15:23:27 UTC 2012


On 7.3.2012 14:22, Jan Zelený wrote:
> Please check the umask mode, that's the only thing I'm not sure about.

The file mode is changed after the file is created using fchmod(), so no 
umask is necessary. I did not use umask in the first place because 
according to mkstemp man page:

"The file is created with permissions 0600, that is, read plus write for 
owner only. (In glibc versions 2.06 and earlier, the file is created 
with permissions 0666, that is, read and write for all users.)"

If you really want to use umask, use umask mode 0133 instead of 0122.

>
> Thanks
> Jan
>

Honza

-- 
Jan Cholasta



More information about the sssd-devel mailing list