mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Minor tidyup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9774 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2ed6e26dc7
commit
92d9b7b431
2 changed files with 16 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
* Source/NSDate.m: GSTimeNow() remove volatile typespec and move
|
* Source/NSDate.m: GSTimeNow() remove volatile typespec and move
|
||||||
initialisation of interval in the hope of fixing a problem with
|
initialisation of interval in the hope of fixing a problem with
|
||||||
float operations. In any case, the code is tidier.
|
float operations. In any case, the code is tidier.
|
||||||
|
* Tools/gdomap.c: If started as root, try to become user nobody.
|
||||||
|
|
||||||
2001-05-03 Adam Fedor <fedor@gnu.org>
|
2001-05-03 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -4222,11 +4222,25 @@ printf(
|
||||||
*/
|
*/
|
||||||
if (getuid () != 0)
|
if (getuid () != 0)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Try to be the user who launched us ... so they can kill us too.
|
||||||
|
*/
|
||||||
setuid (getuid ());
|
setuid (getuid ());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setuid (-1);
|
int uid = -1;
|
||||||
|
#ifdef HAVE_PWD
|
||||||
|
#ifdef HAVE_GETPWNAM
|
||||||
|
struct passwd *pw = getpwnam("nobody");
|
||||||
|
|
||||||
|
if (pw != 0)
|
||||||
|
{
|
||||||
|
uid = pw->pw_uid;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
setuid (uid);
|
||||||
}
|
}
|
||||||
#endif /* __MINGW__ */
|
#endif /* __MINGW__ */
|
||||||
#if !defined(__svr4__)
|
#if !defined(__svr4__)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue