diff options
Diffstat (limited to 'gnu/usr.bin')
27 files changed, 259 insertions, 171 deletions
diff --git a/gnu/usr.bin/sudo/sudo/check.c b/gnu/usr.bin/sudo/sudo/check.c index b8632542645..563cd8f3585 100644 --- a/gnu/usr.bin/sudo/sudo/check.c +++ b/gnu/usr.bin/sudo/sudo/check.c @@ -1,7 +1,7 @@ -/* $OpenBSD: check.c,v 1.7 1998/02/06 19:02:52 millert Exp $ */ +/* $OpenBSD: check.c,v 1.8 1998/03/31 06:40:49 millert Exp $ */ /* - * CU sudo version 1.5.4 (based on Root Group sudo version 1.1) + * CU sudo version 1.5.5 (based on Root Group sudo version 1.1) * * This software comes with no waranty whatsoever, use at your own risk. * @@ -38,7 +38,7 @@ */ #ifndef lint -static char rcsid[] = "Id: check.c,v 1.124 1998/01/13 04:48:01 millert Exp $"; +static char rcsid[] = "Id: check.c,v 1.133 1998/03/31 05:05:28 millert Exp $"; #endif /* lint */ #include "config.h" @@ -442,7 +442,7 @@ static void check_passwd() struct SD_CLIENT sd_dat, *sd; /* SecurID data block */ register int counter = TRIES_FOR_PASSWORD; - (void) memset ((VOID *)&sd_dat, 0, sizeof(sd_dat)); + (void) memset((VOID *)&sd_dat, 0, sizeof(sd_dat)); sd = &sd_dat; /* Initialize SecurID. */ @@ -489,6 +489,10 @@ static void check_passwd() #if defined(HAVE_KERB4) && defined(USE_GETPASS) char kpass[_PASSWD_LEN + 1]; #endif /* HAVE_KERB4 && USE_GETPASS */ +#ifdef HAVE_AUTHENTICATE + char *message; + int reenter; +#endif /* HAVE_AUTHENTICATE */ #ifdef HAVE_SKEY (void) memset((VOID *)&skey, 0, sizeof(skey)); @@ -502,30 +506,41 @@ static void check_passwd() */ while (counter > 0) { -#ifdef HAVE_SKEY +#ifdef HAVE_AUTHENTICATE + /* use AIX authenticate() function */ +# ifdef USE_GETPASS + pass = (char *) getpass(prompt); +# else + pass = tgetpass(prompt, PASSWORD_TIMEOUT * 60, user_name, shost); +# endif /* USE_GETPASS */ + reenter = 1; + if (authenticate(user_name, pass, &reenter, &message) == 0) + return; /* valid password */ +#else +# ifdef HAVE_SKEY /* rewrite the prompt if using s/key since the challenge can change */ set_perms(PERM_ROOT, 0); prompt = sudo_skeyprompt(&skey, prompt); set_perms(PERM_USER, 0); -#endif /* HAVE_SKEY */ -#ifdef HAVE_OPIE +# endif /* HAVE_SKEY */ +# ifdef HAVE_OPIE /* rewrite the prompt if using OPIE since the challenge can change */ set_perms(PERM_ROOT, 0); prompt = sudo_opieprompt(&opie, prompt); set_perms(PERM_USER, 0); -#endif /* HAVE_OPIE */ +# endif /* HAVE_OPIE */ /* get a password from the user */ -#ifdef USE_GETPASS -# ifdef HAVE_KERB4 +# ifdef USE_GETPASS +# ifdef HAVE_KERB4 (void) des_read_pw_string(kpass, sizeof(kpass) - 1, prompt, 0); pass = kpass; -# else +# else pass = (char *) getpass(prompt); -# endif /* HAVE_KERB4 */ -#else +# endif /* HAVE_KERB4 */ +# else pass = tgetpass(prompt, PASSWORD_TIMEOUT * 60, user_name, shost); -#endif /* USE_GETPASS */ +# endif /* USE_GETPASS */ /* Exit loop on nil password */ if (!pass || *pass == '\0') { @@ -535,7 +550,7 @@ static void check_passwd() break; } -#ifdef HAVE_SKEY +# ifdef HAVE_SKEY /* Only check s/key db if the user exists there */ if (skey.keyfile) { set_perms(PERM_ROOT, 0); @@ -545,8 +560,8 @@ static void check_passwd() } set_perms(PERM_USER, 0); } -#endif /* HAVE_SKEY */ -#ifdef HAVE_OPIE +# endif /* HAVE_SKEY */ +# ifdef HAVE_OPIE /* Only check OPIE db if the user exists there */ if (opie.opie_flags) { set_perms(PERM_ROOT, 0); @@ -556,58 +571,58 @@ static void check_passwd() } set_perms(PERM_USER, 0); } -#endif /* HAVE_OPIE */ -#if !defined(HAVE_SKEY) || !defined(SKEY_ONLY) +# endif /* HAVE_OPIE */ +# if !defined(HAVE_SKEY) || !defined(SKEY_ONLY) /* * If we use shadow passwords with a different crypt(3) * check that here, else use standard crypt(3). */ -# if (SHADOW_TYPE != SPW_NONE) && (SHADOW_TYPE != SPW_BSD) -# if (SHADOW_TYPE == SPW_ULTRIX4) +# if (SHADOW_TYPE != SPW_NONE) && (SHADOW_TYPE != SPW_BSD) +# if (SHADOW_TYPE == SPW_ULTRIX4) if (!strcmp(user_passwd, (char *) crypt16(pass, user_passwd))) return; /* if the passwd is correct return() */ -# endif /* ULTRIX4 */ -# if (SHADOW_TYPE == SPW_SECUREWARE) && !defined(__alpha) -# ifdef HAVE_BIGCRYPT +# endif /* ULTRIX4 */ +# if (SHADOW_TYPE == SPW_SECUREWARE) && !defined(__alpha) +# ifdef HAVE_BIGCRYPT if (strcmp(user_passwd, (char *) bigcrypt(pass, user_passwd)) == 0) return; /* if the passwd is correct return() */ -# else +# else if (strcmp(user_passwd, crypt(pass, user_passwd)) == 0) return; /* if the passwd is correct return() */ -# endif /* HAVE_BIGCRYPT */ -# endif /* SECUREWARE && !__alpha */ -# if (SHADOW_TYPE == SPW_SECUREWARE) && defined(__alpha) +# endif /* HAVE_BIGCRYPT */ +# endif /* SECUREWARE && !__alpha */ +# if (SHADOW_TYPE == SPW_SECUREWARE) && defined(__alpha) if (crypt_type == AUTH_CRYPT_BIGCRYPT) { if (!strcmp(user_passwd, bigcrypt(pass, user_passwd))) return; /* if the passwd is correct return() */ } else if (crypt_type == AUTH_CRYPT_CRYPT16) { if (!strcmp(user_passwd, crypt16(pass, user_passwd))) return; /* if the passwd is correct return() */ -#ifdef AUTH_CRYPT_OLDCRYPT +# ifdef AUTH_CRYPT_OLDCRYPT } else if (crypt_type == AUTH_CRYPT_OLDCRYPT || crypt_type == AUTH_CRYPT_C1CRYPT) { if (!strcmp(user_passwd, crypt(pass, user_passwd))) return; /* if the passwd is correct return() */ -#endif +# endif } else { (void) fprintf(stderr, "%s: Sorry, I don't know how to deal with crypt type %d.\n", Argv[0], crypt_type); exit(1); } -# endif /* SECUREWARE && __alpha */ -# endif /* SHADOW_TYPE != SPW_NONE && SHADOW_TYPE != SPW_BSD */ +# endif /* SECUREWARE && __alpha */ +# endif /* SHADOW_TYPE != SPW_NONE && SHADOW_TYPE != SPW_BSD */ /* Normal UN*X password check */ if (!strcmp(user_passwd, (char *) crypt(pass, user_passwd))) return; /* if the passwd is correct return() */ -# ifdef HAVE_KERB4 +# ifdef HAVE_KERB4 if (user_uid && sudo_krb_validate_user(user_pw_ent, pass) == 0) return; -# endif /* HAVE_KERB4 */ +# endif /* HAVE_KERB4 */ -# ifdef HAVE_AFS +# ifdef HAVE_AFS if (ka_UserAuthenticateGeneral(KA_USERAUTH_VERSION, user_name, /* name */ NULL, /* instance */ @@ -617,16 +632,17 @@ static void check_passwd() 0, 0, /* spare */ NULL) == 0) /* reason */ return; -# endif /* HAVE_AFS */ -# ifdef HAVE_DCE +# endif /* HAVE_AFS */ +# ifdef HAVE_DCE /* * consult the DCE registry for password validation * note that dce_pwent trashes pass upon return... */ if (dce_pwent(user_name, pass)) return; -# endif /* HAVE_DCE */ -#endif /* !HAVE_SKEY || !SKEY_ONLY */ +# endif /* HAVE_DCE */ +# endif /* !HAVE_SKEY || !SKEY_ONLY */ +#endif /* HAVE_AUTHENTICATE */ --counter; /* otherwise, try again */ #ifdef USE_INSULTS @@ -870,7 +886,7 @@ static void reminder() (void) fprintf(stderr, "\n%s\n%s\n\n%s\n%s\n\n", #else (void) fprintf(stderr, "\n%s\n%s\n%s\n%s\n\n%s\n%s\n\n%s\n%s\n\n", - " CU sudo version 1.5.4, based on Root Group sudo version 1.1", + " CU sudo version 1.5.5, based on Root Group sudo version 1.1", " sudo version 1.1, Copyright (C) 1991 The Root Group, Inc.", " sudo comes with ABSOLUTELY NO WARRANTY. This is free software,", " and you are welcome to redistribute it under certain conditions.", diff --git a/gnu/usr.bin/sudo/sudo/compat.h b/gnu/usr.bin/sudo/sudo/compat.h index ed077cfe21b..2ce5a5e093a 100644 --- a/gnu/usr.bin/sudo/sudo/compat.h +++ b/gnu/usr.bin/sudo/sudo/compat.h @@ -1,7 +1,7 @@ -/* $OpenBSD: compat.h,v 1.4 1998/01/13 05:30:21 millert Exp $ */ +/* $OpenBSD: compat.h,v 1.5 1998/03/31 06:40:50 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * * Please send bugs, changes, problems to sudo-bugs@courtesan.com * - * Id: compat.h,v 1.30 1998/01/13 04:48:01 millert Exp $ + * Id: compat.h,v 1.36 1998/03/31 05:05:29 millert Exp $ */ #ifndef _SUDO_COMPAT_H diff --git a/gnu/usr.bin/sudo/sudo/config.h b/gnu/usr.bin/sudo/sudo/config.h index 58f0f424f25..6dd39adfe49 100644 --- a/gnu/usr.bin/sudo/sudo/config.h +++ b/gnu/usr.bin/sudo/sudo/config.h @@ -1,8 +1,8 @@ -/* $OpenBSD: config.h,v 1.3 1998/01/13 05:30:21 millert Exp $ */ +/* $OpenBSD: config.h,v 1.4 1998/03/31 06:40:51 millert Exp $ */ /* config.h. Generated automatically by configure. */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,7 @@ * * Please send bugs, changes, problems to sudo-bugs@courtesan.com * - * Id: config.h.in,v 1.80 1998/01/13 04:48:01 millert Exp $ + * Id: config.h.in,v 1.87 1998/03/31 05:05:30 millert Exp $ */ /* @@ -94,6 +94,9 @@ /* Define if you use SecurID. */ /* #undef HAVE_SECURID */ +/* Define if you use AIX general authentication. */ +/* #undef HAVE_AUTHENTICATE */ + /* Define if you use Kerberos. */ /* #undef HAVE_KERB4 */ diff --git a/gnu/usr.bin/sudo/sudo/find_path.c b/gnu/usr.bin/sudo/sudo/find_path.c index 7385e449332..d679e71944c 100644 --- a/gnu/usr.bin/sudo/sudo/find_path.c +++ b/gnu/usr.bin/sudo/sudo/find_path.c @@ -1,7 +1,7 @@ -/* $OpenBSD: find_path.c,v 1.4 1998/01/13 05:30:22 millert Exp $ */ +/* $OpenBSD: find_path.c,v 1.5 1998/03/31 06:40:53 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,7 +31,7 @@ */ #ifndef lint -static char rcsid[] = "Id: find_path.c,v 1.66 1998/01/13 04:48:17 millert Exp $"; +static char rcsid[] = "Id: find_path.c,v 1.72 1998/03/31 05:05:31 millert Exp $"; #endif /* lint */ #include "config.h" diff --git a/gnu/usr.bin/sudo/sudo/getspwuid.c b/gnu/usr.bin/sudo/sudo/getspwuid.c index e620f09bf11..8ba130d1b3a 100644 --- a/gnu/usr.bin/sudo/sudo/getspwuid.c +++ b/gnu/usr.bin/sudo/sudo/getspwuid.c @@ -1,7 +1,7 @@ -/* $OpenBSD: getspwuid.c,v 1.4 1998/01/13 05:30:22 millert Exp $ */ +/* $OpenBSD: getspwuid.c,v 1.5 1998/03/31 06:40:54 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ */ #ifndef lint -static char rcsid[] = "Id: getspwuid.c,v 1.22 1998/01/13 04:48:17 millert Exp $"; +static char rcsid[] = "Id: getspwuid.c,v 1.28 1998/03/31 05:05:32 millert Exp $"; #endif /* lint */ #include "config.h" diff --git a/gnu/usr.bin/sudo/sudo/goodpath.c b/gnu/usr.bin/sudo/sudo/goodpath.c index 0ca8e34c1e7..c09920caa81 100644 --- a/gnu/usr.bin/sudo/sudo/goodpath.c +++ b/gnu/usr.bin/sudo/sudo/goodpath.c @@ -1,7 +1,7 @@ -/* $OpenBSD: goodpath.c,v 1.4 1998/01/13 05:30:23 millert Exp $ */ +/* $OpenBSD: goodpath.c,v 1.5 1998/03/31 06:40:55 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,7 +31,7 @@ */ #ifndef lint -static char rcsid[] = "Id: goodpath.c,v 1.15 1998/01/13 04:48:17 millert Exp $"; +static char rcsid[] = "Id: goodpath.c,v 1.21 1998/03/31 05:05:33 millert Exp $"; #endif /* lint */ #include "config.h" diff --git a/gnu/usr.bin/sudo/sudo/ins_2001.h b/gnu/usr.bin/sudo/sudo/ins_2001.h index 03f9397c0cb..43ca8fe689f 100644 --- a/gnu/usr.bin/sudo/sudo/ins_2001.h +++ b/gnu/usr.bin/sudo/sudo/ins_2001.h @@ -1,7 +1,7 @@ -/* $OpenBSD: ins_2001.h,v 1.4 1998/01/13 05:30:23 millert Exp $ */ +/* $OpenBSD: ins_2001.h,v 1.5 1998/03/31 06:40:56 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * * Please send bugs, changes, problems to sudo-bugs@courtesan.com * - * Id: ins_2001.h,v 1.12 1998/01/13 04:48:17 millert Exp $ + * Id: ins_2001.h,v 1.18 1998/03/31 05:05:34 millert Exp $ */ #ifndef _SUDO_INS_2001_H diff --git a/gnu/usr.bin/sudo/sudo/ins_classic.h b/gnu/usr.bin/sudo/sudo/ins_classic.h index e269196af21..815cd3a2e89 100644 --- a/gnu/usr.bin/sudo/sudo/ins_classic.h +++ b/gnu/usr.bin/sudo/sudo/ins_classic.h @@ -1,7 +1,7 @@ -/* $OpenBSD: ins_classic.h,v 1.4 1998/01/13 05:30:24 millert Exp $ */ +/* $OpenBSD: ins_classic.h,v 1.5 1998/03/31 06:40:57 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * * Please send bugs, changes, problems to sudo-bugs@courtesan.com * - * Id: ins_classic.h,v 1.12 1998/01/13 04:48:17 millert Exp $ + * Id: ins_classic.h,v 1.18 1998/03/31 05:05:34 millert Exp $ */ #ifndef _SUDO_INS_CLASSIC_H diff --git a/gnu/usr.bin/sudo/sudo/ins_csops.h b/gnu/usr.bin/sudo/sudo/ins_csops.h index a3b2c33654c..2f833ff8967 100644 --- a/gnu/usr.bin/sudo/sudo/ins_csops.h +++ b/gnu/usr.bin/sudo/sudo/ins_csops.h @@ -1,7 +1,7 @@ -/* $OpenBSD: ins_csops.h,v 1.4 1998/01/13 05:30:24 millert Exp $ */ +/* $OpenBSD: ins_csops.h,v 1.5 1998/03/31 06:40:58 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * * Please send bugs, changes, problems to sudo-bugs@courtesan.com * - * Id: ins_csops.h,v 1.11 1998/01/13 04:48:17 millert Exp $ + * Id: ins_csops.h,v 1.17 1998/03/31 05:05:35 millert Exp $ */ #ifndef _SUDO_INS_CSOPS_H diff --git a/gnu/usr.bin/sudo/sudo/ins_goons.h b/gnu/usr.bin/sudo/sudo/ins_goons.h index 5f98ca40457..fb759b43a1d 100644 --- a/gnu/usr.bin/sudo/sudo/ins_goons.h +++ b/gnu/usr.bin/sudo/sudo/ins_goons.h @@ -1,7 +1,7 @@ -/* $OpenBSD: ins_goons.h,v 1.4 1998/01/13 05:30:24 millert Exp $ */ +/* $OpenBSD: ins_goons.h,v 1.5 1998/03/31 06:40:59 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * * Please send bugs, changes, problems to sudo-bugs@courtesan.com * - * Id: ins_goons.h,v 1.12 1998/01/13 04:48:17 millert Exp $ + * Id: ins_goons.h,v 1.18 1998/03/31 05:05:36 millert Exp $ */ #ifndef _SUDO_INS_GOONS_H diff --git a/gnu/usr.bin/sudo/sudo/insults.h b/gnu/usr.bin/sudo/sudo/insults.h index 947ec131917..2954537fd61 100644 --- a/gnu/usr.bin/sudo/sudo/insults.h +++ b/gnu/usr.bin/sudo/sudo/insults.h @@ -1,7 +1,7 @@ -/* $OpenBSD: insults.h,v 1.4 1998/01/13 05:30:25 millert Exp $ */ +/* $OpenBSD: insults.h,v 1.5 1998/03/31 06:41:01 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * * Please send bugs, changes, problems to sudo-bugs@courtesan.com * - * Id: insults.h,v 1.24 1998/01/13 04:48:17 millert Exp $ + * Id: insults.h,v 1.30 1998/03/31 05:05:37 millert Exp $ */ #ifndef _SUDO_INSULTS_H diff --git a/gnu/usr.bin/sudo/sudo/interfaces.c b/gnu/usr.bin/sudo/sudo/interfaces.c index 540c7c6ad7f..119dbdf7aaa 100644 --- a/gnu/usr.bin/sudo/sudo/interfaces.c +++ b/gnu/usr.bin/sudo/sudo/interfaces.c @@ -1,7 +1,7 @@ -/* $OpenBSD: interfaces.c,v 1.4 1998/01/13 05:30:25 millert Exp $ */ +/* $OpenBSD: interfaces.c,v 1.5 1998/03/31 06:41:02 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ */ #ifndef lint -static char rcsid[] = "Id: interfaces.c,v 1.28 1998/01/13 04:48:17 millert Exp $"; +static char rcsid[] = "Id: interfaces.c,v 1.34 1998/03/31 05:05:37 millert Exp $"; #endif /* lint */ #include "config.h" @@ -84,6 +84,7 @@ static char rcsid[] = "Id: interfaces.c,v 1.28 1998/01/13 04:48:17 millert Exp $ #if !defined(STDC_HEADERS) && !defined(__GNUC__) extern char *malloc __P((size_t)); +extern char *realloc __P((VOID *, size_t)); #endif /* !STDC_HEADERS && !__GNUC__ */ /* @@ -107,11 +108,12 @@ extern char **Argv; void load_interfaces() { struct ifconf *ifconf; - char ifconf_buf[sizeof(struct ifconf) + BUFSIZ]; struct ifreq ifreq, *ifr; struct sockaddr_in *sin; - unsigned long localhost_mask; + unsigned int localhost_mask; int sock, n, i; + size_t len = sizeof(struct ifconf) + BUFSIZ; + char *ifconf_buf = NULL; #ifdef _ISC struct strioctl strioctl; #endif /* _ISC */ @@ -128,18 +130,35 @@ void load_interfaces() /* * get interface configuration or return (leaving interfaces NULL) */ - ifconf = (struct ifconf *) ifconf_buf; - ifconf->ifc_buf = (caddr_t) (ifconf_buf + sizeof(struct ifconf)); - ifconf->ifc_len = sizeof(ifconf_buf) - sizeof(struct ifconf); + for (;;) { + if (ifconf_buf == NULL) + ifconf_buf = (char *) malloc(len); + else + ifconf_buf = (char *) realloc(ifconf_buf, len); + if (ifconf_buf == NULL) { + perror("malloc"); + exit(1); + } + ifconf = (struct ifconf *) ifconf_buf; + ifconf->ifc_len = len - sizeof(struct ifconf); + ifconf->ifc_buf = (caddr_t) (ifconf_buf + sizeof(struct ifconf)); - /* networking may not be installed in kernel */ + /* networking may not be installed in kernel */ #ifdef _ISC - STRSET(SIOCGIFCONF, (caddr_t) ifconf, sizeof(ifconf_buf)); - if (ioctl(sock, I_STR, (caddr_t) &strioctl) < 0) + STRSET(SIOCGIFCONF, (caddr_t) ifconf, len); + if (ioctl(sock, I_STR, (caddr_t) &strioctl) < 0) { #else - if (ioctl(sock, SIOCGIFCONF, (caddr_t) ifconf) < 0) + if (ioctl(sock, SIOCGIFCONF, (caddr_t) ifconf) < 0) { #endif /* _ISC */ - return; + (void) free(ifconf_buf); + return; + } + + /* break out of loop if we have a big enough buffer */ + if (ifconf->ifc_len + sizeof(struct ifreq) < len) + break; + len += BUFSIZ; + } /* * get the maximum number of interfaces that *could* exist. @@ -247,6 +266,7 @@ void load_interfaces() (void) free(interfaces); } } + (void) free(ifconf_buf); } #else /* !SIOCGIFCONF || STUB_LOAD_INTERFACES */ diff --git a/gnu/usr.bin/sudo/sudo/logging.c b/gnu/usr.bin/sudo/sudo/logging.c index 1ecef46a7a0..597ad3dc976 100644 --- a/gnu/usr.bin/sudo/sudo/logging.c +++ b/gnu/usr.bin/sudo/sudo/logging.c @@ -1,7 +1,7 @@ -/* $OpenBSD: logging.c,v 1.5 1998/01/13 05:30:26 millert Exp $ */ +/* $OpenBSD: logging.c,v 1.6 1998/03/31 06:41:03 millert Exp $ */ /* - * CU sudo version 1.5.4 (based on Root Group sudo version 1.1) + * CU sudo version 1.5.5 (based on Root Group sudo version 1.1) * * This software comes with no waranty whatsoever, use at your own risk. * @@ -39,7 +39,7 @@ */ #ifndef lint -static char rcsid[] = "Id: logging.c,v 1.88 1998/01/13 04:48:42 millert Exp $"; +static char rcsid[] = "Id: logging.c,v 1.94 1998/03/31 05:05:38 millert Exp $"; #endif /* lint */ #include "config.h" diff --git a/gnu/usr.bin/sudo/sudo/options.h b/gnu/usr.bin/sudo/sudo/options.h index adc0363d479..e7b57a0140c 100644 --- a/gnu/usr.bin/sudo/sudo/options.h +++ b/gnu/usr.bin/sudo/sudo/options.h @@ -1,7 +1,7 @@ -/* $OpenBSD: options.h,v 1.8 1998/01/13 05:30:26 millert Exp $ */ +/* $OpenBSD: options.h,v 1.9 1998/03/31 06:41:04 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * * Please send bugs, changes, problems to sudo-bugs@courtesan.com * - * Id: options.h,v 1.35 1998/01/13 04:48:42 millert Exp $ + * Id: options.h,v 1.42 1998/03/31 05:15:42 millert Exp $ */ #ifndef _SUDO_OPTIONS_H @@ -67,6 +67,7 @@ /*#define USE_TTY_TICKETS /* have a different ticket file for each tty */ /*#define OTP_ONLY /* validate user via OTP (skey/opie) only */ /*#define LONG_OTP_PROMPT /* use a two line OTP (skey/opie) prompt */ +/*#define STUB_LOAD_INTERFACES /* don't try to read ether interfaces */ #define FAST_MATCH /* command check fails if basenames not same */ #ifndef SUDOERS_MODE #define SUDOERS_MODE 0440 /* file mode for sudoers (octal) */ diff --git a/gnu/usr.bin/sudo/sudo/parse.c b/gnu/usr.bin/sudo/sudo/parse.c index bf1bf5b2d43..e7fbb4b0764 100644 --- a/gnu/usr.bin/sudo/sudo/parse.c +++ b/gnu/usr.bin/sudo/sudo/parse.c @@ -1,7 +1,7 @@ -/* $OpenBSD: parse.c,v 1.6 1998/01/13 15:22:31 millert Exp $ */ +/* $OpenBSD: parse.c,v 1.7 1998/03/31 06:41:05 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ */ #ifndef lint -static char rcsid[] = "Id: parse.c,v 1.79 1998/01/13 15:19:08 millert Exp $"; +static char rcsid[] = "Id: parse.c,v 1.88 1998/03/31 05:05:40 millert Exp $"; #endif /* lint */ #include "config.h" @@ -107,17 +107,13 @@ static int has_meta __P((char *)); int validate(check_cmnd) int check_cmnd; { - FILE *sudoers_fp; int return_code; /* become sudoers file owner */ set_perms(PERM_SUDOERS, 0); - if ((sudoers_fp = fopen(_PATH_SUDO_SUDOERS, "r")) == NULL) { - perror(_PATH_SUDO_SUDOERS); - log_error(NO_SUDOERS_FILE); - exit(1); - } + /* we opened _PATH_SUDO_SUDOERS in check_sudoers() so just rewind it */ + rewind(sudoers_fp); yyin = sudoers_fp; yyout = stdout; @@ -136,6 +132,7 @@ int validate(check_cmnd) * Don't need to keep this open... */ (void) fclose(sudoers_fp); + sudoers_fp = NULL; /* relinquish extra privs */ set_perms(PERM_USER, 0); diff --git a/gnu/usr.bin/sudo/sudo/parse.lex b/gnu/usr.bin/sudo/sudo/parse.lex index 9a46a4515d5..f149a06708f 100644 --- a/gnu/usr.bin/sudo/sudo/parse.lex +++ b/gnu/usr.bin/sudo/sudo/parse.lex @@ -1,7 +1,8 @@ %{ -/* $OpenBSD: parse.lex,v 1.4 1998/01/13 05:30:27 millert Exp $ */ +/* $OpenBSD: parse.lex,v 1.5 1998/03/31 06:41:06 millert Exp $ */ + /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "Id: parse.lex,v 1.70 1998/01/13 04:48:42 millert Exp $"; +static char rcsid[] = "$Id: parse.lex,v 1.5 1998/03/31 06:41:06 millert Exp $"; #endif /* lint */ #include "config.h" diff --git a/gnu/usr.bin/sudo/sudo/parse.yacc b/gnu/usr.bin/sudo/sudo/parse.yacc index 538c07cc4f4..62a8c1d8fb0 100644 --- a/gnu/usr.bin/sudo/sudo/parse.yacc +++ b/gnu/usr.bin/sudo/sudo/parse.yacc @@ -1,8 +1,9 @@ %{ -/* $OpenBSD: parse.yacc,v 1.8 1998/01/13 07:31:06 millert Exp $ */ +/* $OpenBSD: parse.yacc,v 1.9 1998/03/31 06:41:08 millert Exp $ */ + /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,7 @@ */ #ifndef lint -static char rcsid[] = "Id: parse.yacc,v 1.104 1998/01/13 07:00:02 millert Exp $"; +static char rcsid[] = "$Id: parse.yacc,v 1.9 1998/03/31 06:41:08 millert Exp $"; #endif /* lint */ #include "config.h" @@ -49,6 +50,9 @@ static char rcsid[] = "Id: parse.yacc,v 1.104 1998/01/13 07:00:02 millert Exp $" #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) #include <malloc.h> #endif /* HAVE_MALLOC_H && !STDC_HEADERS */ +#if defined(YYBISON) && defined(HAVE_ALLOCA_H) && !defined(__GNUC__) +#include <alloca.h> +#endif /* YYBISON && HAVE_ALLOCA_H && !__GNUC__ */ #ifdef HAVE_LSEARCH #include <search.h> #endif /* HAVE_LSEARCH */ @@ -88,7 +92,7 @@ int top = 0, stacksize = 0; #define push \ { \ - if (top > stacksize) { \ + if (top >= stacksize) { \ while ((stacksize += STACKINCREMENT) < top); \ match = (struct matchstack *) realloc(match, sizeof(struct matchstack) * stacksize); \ if (match == NULL) { \ diff --git a/gnu/usr.bin/sudo/sudo/pathnames.h b/gnu/usr.bin/sudo/sudo/pathnames.h index e72a447cf5d..e092b3835ef 100644 --- a/gnu/usr.bin/sudo/sudo/pathnames.h +++ b/gnu/usr.bin/sudo/sudo/pathnames.h @@ -1,7 +1,7 @@ -/* $OpenBSD: pathnames.h,v 1.4 1998/01/13 05:30:28 millert Exp $ */ +/* $OpenBSD: pathnames.h,v 1.5 1998/03/31 06:41:09 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * * Please send bugs, changes, problems to sudo-bugs@courtesan.com * - * Id: pathnames.h,v 1.24 1998/01/13 04:48:42 millert Exp $ + * Id: pathnames.h,v 1.30 1998/03/31 05:05:42 millert Exp $ */ /* diff --git a/gnu/usr.bin/sudo/sudo/sudo.8 b/gnu/usr.bin/sudo/sudo/sudo.8 index 3630213fcbe..33f256e936b 100644 --- a/gnu/usr.bin/sudo/sudo/sudo.8 +++ b/gnu/usr.bin/sudo/sudo/sudo.8 @@ -1,11 +1,11 @@ .rn '' }` -''' $OpenBSD: sudo.8,v 1.4 1998/01/13 05:30:29 millert Exp $ +''' $OpenBSD: sudo.8,v 1.5 1998/03/31 06:41:10 millert Exp $ ''' -''' $RCSfile: sudo.8,v $$Revision: 1.4 $$Date: 1998/01/13 05:30:29 $ +''' $RCSfile: sudo.8,v $$Revision: 1.5 $$Date: 1998/03/31 06:41:10 $ ''' ''' $Log: sudo.8,v $ -''' Revision 1.4 1998/01/13 05:30:29 millert -''' sudo 1.5.4 +''' Revision 1.5 1998/03/31 06:41:10 millert +''' sudo 1.5.5 ''' ''' .de Sh @@ -98,7 +98,7 @@ .nr % 0 .rr F .\} -.TH sudo 8 "1.5.4" "12/Jan/98" "MAINTENANCE COMMANDS" +.TH sudo 8 "1.5.5" "20/Jan/98" "MAINTENANCE COMMANDS" .UC .if n .hy 0 .if n .na diff --git a/gnu/usr.bin/sudo/sudo/sudo.c b/gnu/usr.bin/sudo/sudo/sudo.c index 87a511b3bb3..a0a91ac2f23 100644 --- a/gnu/usr.bin/sudo/sudo/sudo.c +++ b/gnu/usr.bin/sudo/sudo/sudo.c @@ -1,7 +1,7 @@ -/* $OpenBSD: sudo.c,v 1.7 1998/01/13 05:30:29 millert Exp $ */ +/* $OpenBSD: sudo.c,v 1.8 1998/03/31 06:41:11 millert Exp $ */ /* - * CU sudo version 1.5.4 (based on Root Group sudo version 1.1) + * CU sudo version 1.5.5 (based on Root Group sudo version 1.1) * * This software comes with no waranty whatsoever, use at your own risk. * @@ -53,7 +53,7 @@ */ #ifndef lint -static char rcsid[] = "Id: sudo.c,v 1.179 1998/01/13 04:48:42 millert Exp $"; +static char rcsid[] = "Id: sudo.c,v 1.190 1998/03/31 05:05:45 millert Exp $"; #endif /* lint */ #define MAIN @@ -151,6 +151,7 @@ char *prompt; char host[MAXHOSTNAMELEN + 1]; char *shost; char cwd[MAXPATHLEN + 1]; +FILE *sudoers_fp = NULL; struct stat cmnd_st; static char *runas_homedir = NULL; extern struct interface *interfaces; @@ -163,7 +164,7 @@ extern int printmatches; struct env_table badenv_table[] = { { "IFS=", 4 }, { "LD_", 3 }, - { "_RLD_", 5 }, + { "_RLD", 4 }, #ifdef __hpux { "SHLIB_PATH=", 11 }, #endif /* __hpux */ @@ -207,6 +208,18 @@ int main(argc, argv) } /* + * Close all file descriptors to make sure we have a nice + * clean slate from which to work. + */ +#ifdef HAVE_SYSCONF + for (rtn = sysconf(_SC_OPEN_MAX) - 1; rtn > 2; rtn--) + (void) close(rtn); +#else + for (rtn = getdtablesize() - 1; rtn > 2; rtn--) + (void) close(rtn); +#endif /* HAVE_SYSCONF */ + + /* * set the prompt based on $SUDO_PROMPT (can be overridden by `-p') */ if ((prompt = getenv("SUDO_PROMPT")) == NULL) @@ -242,18 +255,6 @@ int main(argc, argv) if (cmnd == NULL && NewArgc == 0 && !(sudo_mode & MODE_SHELL)) usage(1); - /* - * Close all file descriptors to make sure we have a nice - * clean slate from which to work. - */ -#ifdef HAVE_SYSCONF - for (rtn = sysconf(_SC_OPEN_MAX) - 1; rtn > 3; rtn--) - (void) close(rtn); -#else - for (rtn = getdtablesize() - 1; rtn > 3; rtn--) - (void) close(rtn); -#endif /* HAVE_SYSCONF */ - clean_env(environ, badenv_table); load_globals(sudo_mode); /* load global variables used throughout sudo */ @@ -669,8 +670,8 @@ static void add_env(contiguous) char *to, **from; if (contiguous) { - size += (size_t) NewArgv[NewArgc-1] + strlen(NewArgv[NewArgc-1]) - - (size_t) NewArgv[1] + 1; + size += (size_t) (NewArgv[NewArgc-1] - NewArgv[1]) + + strlen(NewArgv[NewArgc-1]) + 1; } else { for (from = &NewArgv[1]; *from; from++) size += strlen(*from) + 1; @@ -785,7 +786,7 @@ static void load_cmnd(sudo_mode) static int check_sudoers() { struct stat statbuf; - int fd = -1, rootstat; + int rootstat, i; char c; int rtn = ALL_SYSTEMS_GO; @@ -834,12 +835,25 @@ static int check_sudoers() rtn = SUDOERS_WRONG_MODE; else if (statbuf.st_uid != SUDOERS_UID || statbuf.st_gid != SUDOERS_GID) rtn = SUDOERS_WRONG_OWNER; - else if ((fd = open(_PATH_SUDO_SUDOERS, O_RDONLY)) == -1 || - read(fd, &c, 1) == -1) - rtn = NO_SUDOERS_FILE; - - if (fd != -1) - (void) close(fd); + else { + /* Solaris sometimes returns EAGAIN so try 10 times */ + for (i = 0; i < 10 ; i++) { + errno = 0; + if ((sudoers_fp = fopen(_PATH_SUDO_SUDOERS, "r")) == NULL || + fread(&c, sizeof(c), 1, sudoers_fp) != 1) { + sudoers_fp = NULL; + if (errno != EAGAIN && errno != EWOULDBLOCK) + break; + } else + break; + sleep(1); + } + if (sudoers_fp == NULL) { + fprintf(stderr, "%s: cannot open %s: ", Argv[0], _PATH_SUDO_SUDOERS); + perror(""); + rtn = NO_SUDOERS_FILE; + } + } set_perms(PERM_ROOT, 0); set_perms(PERM_USER, 0); @@ -924,6 +938,20 @@ void set_perms(perm, sudo_mode) exit(1); } + /* + * Initialize group vector only if + * we are going to be a non-root user. + */ + if (strcmp(runas_user, "root") != 0 && + initgroups(runas_user, pw_ent->pw_gid) + == -1) { + (void) fprintf(stderr, + "%s: cannot set group vector ", + Argv[0]); + perror(""); + exit(1); + } + if (setuid(pw_ent->pw_uid)) { (void) fprintf(stderr, "%s: cannot set uid to %d: ", diff --git a/gnu/usr.bin/sudo/sudo/sudo.h b/gnu/usr.bin/sudo/sudo/sudo.h index 4b29f117e64..a8650ed37e8 100644 --- a/gnu/usr.bin/sudo/sudo/sudo.h +++ b/gnu/usr.bin/sudo/sudo/sudo.h @@ -1,7 +1,7 @@ -/* $OpenBSD: sudo.h,v 1.4 1998/01/13 05:30:30 millert Exp $ */ +/* $OpenBSD: sudo.h,v 1.5 1998/03/31 06:41:12 millert Exp $ */ /* - * CU sudo version 1.5.4 (based on Root Group sudo version 1.1) + * CU sudo version 1.5.5 (based on Root Group sudo version 1.1) * * This software comes with no waranty whatsoever, use at your own risk. * @@ -27,7 +27,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Id: sudo.h,v 1.115 1998/01/13 04:48:42 millert Exp $ + * Id: sudo.h,v 1.122 1998/03/31 05:05:45 millert Exp $ */ #ifndef _SUDO_SUDO_H @@ -232,6 +232,7 @@ extern int Argc; extern char **Argv; extern int NewArgc; extern char **NewArgv; +extern FILE *sudoers_fp; #endif extern int errno; diff --git a/gnu/usr.bin/sudo/sudo/sudo_setenv.c b/gnu/usr.bin/sudo/sudo/sudo_setenv.c index 0f4e42f43cf..5339c707aee 100644 --- a/gnu/usr.bin/sudo/sudo/sudo_setenv.c +++ b/gnu/usr.bin/sudo/sudo/sudo_setenv.c @@ -1,7 +1,7 @@ -/* $OpenBSD: sudo_setenv.c,v 1.4 1998/01/13 05:30:30 millert Exp $ */ +/* $OpenBSD: sudo_setenv.c,v 1.5 1998/03/31 06:41:14 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "Id: sudo_setenv.c,v 1.19 1998/01/13 04:48:42 millert Exp $"; +static char rcsid[] = "Id: sudo_setenv.c,v 1.25 1998/03/31 05:05:46 millert Exp $"; #endif /* lint */ #include "config.h" diff --git a/gnu/usr.bin/sudo/sudo/sudoers.5 b/gnu/usr.bin/sudo/sudo/sudoers.5 index f940411f4cf..34caa3f09d7 100644 --- a/gnu/usr.bin/sudo/sudo/sudoers.5 +++ b/gnu/usr.bin/sudo/sudo/sudoers.5 @@ -1,11 +1,11 @@ .rn '' }` -''' $OpenBSD: sudoers.5,v 1.4 1998/01/13 05:30:30 millert Exp $ +''' $OpenBSD: sudoers.5,v 1.5 1998/03/31 06:41:15 millert Exp $ ''' -''' $RCSfile: sudoers.5,v $$Revision: 1.4 $$Date: 1998/01/13 05:30:30 $ +''' $RCSfile: sudoers.5,v $$Revision: 1.5 $$Date: 1998/03/31 06:41:15 $ ''' ''' $Log: sudoers.5,v $ -''' Revision 1.4 1998/01/13 05:30:30 millert -''' sudo 1.5.4 +''' Revision 1.5 1998/03/31 06:41:15 millert +''' sudo 1.5.5 ''' ''' .de Sh @@ -98,7 +98,7 @@ .nr % 0 .rr F .\} -.TH sudoers 5 "1.5.4" "13/Nov/96" "FILE FORMATS" +.TH sudoers 5 "1.5.5" "6/Feb/98" "FILE FORMATS" .UC .if n .hy 0 .if n .na @@ -348,7 +348,7 @@ with a \*(L"\e\*(R" if used in command arguments: \*(L",\*(R", \*(L":\*(R", \*(L \& PARTTIME ALL=ALL,!SHELLS,!SU \& +interns +openlabs=ALL,!SHELLS,!SU \& britt REMOTE=SHUTDOWN:ALL=LPCS -\& jimbo CUNETS=/bin/su ?*,!/bin/su root +\& jimbo CUNETS=/bin/su ?*,!/bin/su *root* \& nieusma SERVERS=SHUTDOWN,/etc/reboot:\e \& HUB=ALL,!SHELLS \& jill houdini=/etc/shutdown -[hr] now,MISC diff --git a/gnu/usr.bin/sudo/sudo/tgetpass.c b/gnu/usr.bin/sudo/sudo/tgetpass.c index a09015b17a1..eac95181647 100644 --- a/gnu/usr.bin/sudo/sudo/tgetpass.c +++ b/gnu/usr.bin/sudo/sudo/tgetpass.c @@ -1,7 +1,7 @@ -/* $OpenBSD: tgetpass.c,v 1.7 1998/02/06 19:02:55 millert Exp $ */ +/* $OpenBSD: tgetpass.c,v 1.8 1998/03/31 06:41:16 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ */ #ifndef lint -static char rcsid[] = "Id: tgetpass.c,v 1.52 1998/01/13 04:48:42 millert Exp $"; +static char rcsid[] = "Id: tgetpass.c,v 1.60 1998/03/31 05:05:48 millert Exp $"; #endif /* lint */ #include "config.h" diff --git a/gnu/usr.bin/sudo/sudo/version.h b/gnu/usr.bin/sudo/sudo/version.h index 85e9893cf11..487783a0f64 100644 --- a/gnu/usr.bin/sudo/sudo/version.h +++ b/gnu/usr.bin/sudo/sudo/version.h @@ -1,7 +1,7 @@ -/* $OpenBSD: version.h,v 1.4 1998/01/13 05:30:31 millert Exp $ */ +/* $OpenBSD: version.h,v 1.5 1998/03/31 06:41:17 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,12 +19,12 @@ * * Please send bugs, changes, problems to sudo-bugs@courtesan.com * - * Id: version.h,v 1.44 1998/01/13 04:48:42 millert Exp $ + * Id: version.h,v 1.45 1998/01/21 05:49:20 millert Exp $ */ #ifndef _SUDO_VERSION_H #define _SUDO_VERSION_H -static char version[] = "1.5.4"; +static char version[] = "1.5.5"; #endif /* _SUDO_VERSION_H */ diff --git a/gnu/usr.bin/sudo/visudo/visudo.8 b/gnu/usr.bin/sudo/visudo/visudo.8 index 29002197512..5c5d6195caa 100644 --- a/gnu/usr.bin/sudo/visudo/visudo.8 +++ b/gnu/usr.bin/sudo/visudo/visudo.8 @@ -1,11 +1,11 @@ .rn '' }` -''' $OpenBSD: visudo.8,v 1.4 1998/01/13 05:30:32 millert Exp $ +''' $OpenBSD: visudo.8,v 1.5 1998/03/31 06:41:19 millert Exp $ ''' -''' $RCSfile: visudo.8,v $$Revision: 1.4 $$Date: 1998/01/13 05:30:32 $ +''' $RCSfile: visudo.8,v $$Revision: 1.5 $$Date: 1998/03/31 06:41:19 $ ''' ''' $Log: visudo.8,v $ -''' Revision 1.4 1998/01/13 05:30:32 millert -''' sudo 1.5.4 +''' Revision 1.5 1998/03/31 06:41:19 millert +''' sudo 1.5.5 ''' ''' .de Sh @@ -98,7 +98,7 @@ .nr % 0 .rr F .\} -.TH visudo 8 "1.5.4" "13/Nov/96" "MAINTENANCE COMMANDS" +.TH visudo 8 "1.5.5" "16/Feb/98" "MAINTENANCE COMMANDS" .UC .if n .hy 0 .if n .na @@ -225,8 +225,17 @@ occurred (if the editor supports this feature). .Ip "-V" 4 The \f(CW-V\fR (version) option causes \fBvisudo\fR to print the version number and exit. +.SH "ERRORS" +.Ip "sudoers file busy, try again later." 4 +Either someone is currently editing the \fIsudoers\fR file +or there is a stale sudoers lock file (/etc/stmp by default) +that you need to delete. +.Ip "/etc/stmp: Permission denied" 4 +You didn't run \fBvisudo\fR as root. +.Ip "Can't find you in the passwd database" 4 +Your userid does not appear in the passwd file. .SH "FILES" -.PP +.Sp .Vb 2 \& /etc/sudoers file of authorized users. \& /etc/stmp lock file for visudo. @@ -234,7 +243,7 @@ and exit. .SH "ENVIRONMENT VARIABLES" The following are used only if \fBvisudo\fR was compiled with the \fIENV_EDITOR\fR option: -.PP +.Sp .Vb 2 \& EDITOR Used by visudo as the editor to use. \& VISUAL Used by visudo if EDITOR is not set. @@ -242,19 +251,19 @@ The following are used only if \fBvisudo\fR was compiled with the .SH "AUTHOR" Many people have worked on \fIsudo\fR over the years, this version of \fBvisudo\fR was written by: -.PP +.Sp .Vb 1 \& Todd Miller <Todd.Miller@courtesan.com> .Ve See the HISTORY file in the sudo distribution for more details. -.PP +.Sp Please send all bugs, comments, and changes to sudo-bugs@courtesan.com. .SH "DISCLAIMER" This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -.PP +.Sp You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -262,7 +271,7 @@ with this program; if not, write to the Free Software Foundation, Inc., Due to the syntax of the \fIsudoers\fR file, there is no way for \fBvisudo\fR to tell the difference between a mistyped {Host,User,Cmnd}_Alias and a user or host name. -.PP +.Sp There is no easy way to prevent a user from gaining a root shell if the editor used by \fBvisudo\fR allows shell escapes. .SH "BUGS" @@ -285,6 +294,14 @@ the individual \fBvisudo\fR program. .IX Item "-V" +.IX Header "ERRORS" + +.IX Item "sudoers file busy, try again later." + +.IX Item "/etc/stmp: Permission denied" + +.IX Item "Can't find you in the passwd database" + .IX Header "FILES" .IX Header "ENVIRONMENT VARIABLES" diff --git a/gnu/usr.bin/sudo/visudo/visudo.c b/gnu/usr.bin/sudo/visudo/visudo.c index e3cbbbe7145..ec8c7a95156 100644 --- a/gnu/usr.bin/sudo/visudo/visudo.c +++ b/gnu/usr.bin/sudo/visudo/visudo.c @@ -1,7 +1,7 @@ -/* $OpenBSD: visudo.c,v 1.6 1998/01/13 05:30:32 millert Exp $ */ +/* $OpenBSD: visudo.c,v 1.7 1998/03/31 06:41:20 millert Exp $ */ /* - * CU sudo version 1.5.4 + * CU sudo version 1.5.5 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "Id: visudo.c,v 1.82 1998/01/13 04:48:42 millert Exp $"; +static char rcsid[] = "$Id: visudo.c,v 1.7 1998/03/31 06:41:20 millert Exp $"; #endif /* lint */ #include "config.h" |