/[man-db]/man-db/src/man.c
ViewVC logotype

Diff of /man-db/src/man.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.86 by cjwatson, Fri Feb 28 01:55:20 2003 UTC revision 1.87 by cjwatson, Fri Mar 28 09:23:50 2003 UTC
# Line 965  int main (int argc, char *argv[]) Line 965  int main (int argc, char *argv[])
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();
# Line 977  int main (int argc, char *argv[]) Line 977  int main (int argc, char *argv[])
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
# Line 1988  static int commit_tmp_cat (const char *c Line 1990  static int commit_tmp_cat (const char *c
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");
# Line 1999  static int commit_tmp_cat (const char *c Line 2002  static int commit_tmp_cat (const char *c
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) {

Legend:
Removed from v.1.86  
changed lines
  Added in v.1.87

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26