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

Jan Zelený jzeleny at redhat.com
Wed Mar 7 16:25:21 UTC 2012


> On Wed, 2012-03-07 at 16:23 +0100, Jan Cholasta wrote:
> > 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.
> 
> Please use umask. This may be the case with glibc, but we can't
> guarantee that behavior on other libc implementations (which would
> hinder porting efforts).

Corrected patch attached.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jzeleny-107-uninitialized-pointer.patch
Type: text/x-patch
Size: 909 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120307/66444623/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jzeleny-108-uninitialized-pointer.patch
Type: text/x-patch
Size: 874 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120307/66444623/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jzeleny-109-1-umask-before-mkstemp.patch
Type: text/x-patch
Size: 1402 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120307/66444623/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jzeleny-110-resource-leak-in-ssh-client.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120307/66444623/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120307/66444623/attachment.sig>


More information about the sssd-devel mailing list