tweaks: rename a symbol, and actually use it where it is needed
parent
e1f80b9707
commit
248d392c4d
|
@ -32,9 +32,9 @@
|
||||||
#ifdef __TANDEM
|
#ifdef __TANDEM
|
||||||
/* Tandem NonStop Kernel support. */
|
/* Tandem NonStop Kernel support. */
|
||||||
#include <floss.h>
|
#include <floss.h>
|
||||||
#define NANO_ROOT_UID 65535
|
#define ROOT_UID 65535
|
||||||
#else
|
#else
|
||||||
#define NANO_ROOT_UID 0
|
#define ROOT_UID 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIMITS_H
|
#ifdef HAVE_LIMITS_H
|
||||||
|
|
|
@ -38,7 +38,7 @@ void get_homedir(void)
|
||||||
#ifdef HAVE_PWD_H
|
#ifdef HAVE_PWD_H
|
||||||
/* When HOME isn't set, or when we're root, get the home directory
|
/* When HOME isn't set, or when we're root, get the home directory
|
||||||
* from the password file instead. */
|
* from the password file instead. */
|
||||||
if (homenv == NULL || geteuid() == 0) {
|
if (homenv == NULL || geteuid() == ROOT_UID) {
|
||||||
const struct passwd *userage = getpwuid(geteuid());
|
const struct passwd *userage = getpwuid(geteuid());
|
||||||
|
|
||||||
if (userage != NULL)
|
if (userage != NULL)
|
||||||
|
|
Loading…
Reference in New Issue