965 |
#ifdef SECURE_MAN_UID |
#ifdef SECURE_MAN_UID |
966 |
/* record who we are and drop effective privs for later use */ |
/* record who we are and drop effective privs for later use */ |
967 |
init_security (); |
init_security (); |
968 |
#endif |
#endif /* SECURE_MAN_UID */ |
969 |
|
|
970 |
if (!catman) |
if (!catman) |
971 |
store_line_length(); |
store_line_length(); |
977 |
do_extern (argv); |
do_extern (argv); |
978 |
|
|
979 |
get_term(); /* stores terminal settings */ |
get_term(); /* stores terminal settings */ |
980 |
|
#ifdef SECURE_MAN_UID |
981 |
if (debug) |
if (debug) |
982 |
fprintf (stderr, "real user = %d; effective user = %d\n", |
fprintf (stderr, "real user = %d; effective user = %d\n", |
983 |
ruid, euid); |
ruid, euid); |
984 |
|
#endif /* SECURE_MAN_UID */ |
985 |
|
|
986 |
#ifdef HAVE_SETLOCALE |
#ifdef HAVE_SETLOCALE |
987 |
/* close this locale and reinitialise if a new locale was |
/* close this locale and reinitialise if a new locale was |
1990 |
{ |
{ |
1991 |
int status = 0; |
int status = 0; |
1992 |
|
|
1993 |
|
#ifdef SECURE_MAN_UID |
1994 |
if (!delete && global_manpath && euid == 0) { |
if (!delete && global_manpath && euid == 0) { |
1995 |
if (debug) { |
if (debug) { |
1996 |
fprintf (stderr, "fixing temporary cat's ownership\n"); |
fprintf (stderr, "fixing temporary cat's ownership\n"); |
2002 |
error (0, errno, _("can't chown %s"), tmp_cat); |
error (0, errno, _("can't chown %s"), tmp_cat); |
2003 |
} |
} |
2004 |
} |
} |
2005 |
|
#endif /* SECURE_MAN_UID */ |
2006 |
|
|
2007 |
if (!delete && !status) { |
if (!delete && !status) { |
2008 |
if (debug) { |
if (debug) { |