[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    RE: [PATCH] xmkstemp: safe mkstemp (-65 bytes)
From:       "Cathey, Jim" <jcathey () ciena ! com>
Date:       2010-10-22 16:30:32
Message-ID: F4AC465B29B61A4FA792A4E6FEA8A202014C5665 () wamxm01 ! ciena ! com
[Download RAW message or body]

>Do you think it makes sense to extend the xmkstemp() to take flags for
>that, or make it another function or do that in place in those
>applets that need it?

I think that manipulation of umask in general should be done
at the application level.  That is, it's inappropriate for
service subroutines to be mucking with that at all, especially
if there's any chance they'll be used in a multithreaded app!

There _is_ already an appropriate function:  umask(2).

In general apps themselves don't usually manipulate umask
much, because the _system_ often has restrictions related
to its security policy.  (Our system, for example, has umask
generally set to 002 rather than the more customary 022.)

-- Jim




_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic