[BACK]Return to sudo.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / sudo

Diff for /src/usr.bin/sudo/Attic/sudo.h between version 1.6 and 1.6.4.1

version 1.6, 2000/11/21 17:58:44 version 1.6.4.1, 2002/01/18 16:14:46
Line 1 
Line 1 
 /*  /*
  * Copyright (c) 1994-1996,1998-2000 Todd C. Miller <Todd.Miller@courtesan.com>   * Copyright (c) 1993-1996,1998-2001 Todd C. Miller <Todd.Miller@courtesan.com>
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
Line 31 
Line 31 
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *   *
  * $Sudo: sudo.h,v 1.172 2000/03/07 04:29:46 millert Exp $   * $Sudo: sudo.h,v 1.184 2002/01/16 21:27:09 millert Exp $
  */   */
   
 #ifndef _SUDO_SUDO_H  #ifndef _SUDO_SUDO_H
Line 47 
Line 47 
  */   */
 struct sudo_user {  struct sudo_user {
     struct passwd *pw;      struct passwd *pw;
       struct passwd *_runas_pw;
       char *path;
       char *shell;
     char *tty;      char *tty;
     char  cwd[MAXPATHLEN];      char  cwd[MAXPATHLEN];
     char *host;      char *host;
Line 90 
Line 93 
 /*  /*
  * Various modes sudo can be in (based on arguments) in octal   * Various modes sudo can be in (based on arguments) in octal
  */   */
 #define MODE_RUN                 00001  #define MODE_RUN                 000001
 #define MODE_VALIDATE            00002  #define MODE_VALIDATE            000002
 #define MODE_INVALIDATE          00004  #define MODE_INVALIDATE          000004
 #define MODE_KILL                00010  #define MODE_KILL                000010
 #define MODE_VERSION             00020  #define MODE_VERSION             000020
 #define MODE_HELP                00040  #define MODE_HELP                000040
 #define MODE_LIST                00100  #define MODE_LIST                000100
 #define MODE_LISTDEFS            00200  #define MODE_LISTDEFS            000200
 #define MODE_BACKGROUND          00400  #define MODE_BACKGROUND          000400
 #define MODE_SHELL               01000  #define MODE_SHELL               001000
 #define MODE_IMPLIED_SHELL       02000  #define MODE_IMPLIED_SHELL       002000
 #define MODE_RESET_HOME          04000  #define MODE_RESET_HOME          004000
   #define MODE_PRESERVE_GROUPS     010000
   
 /*  /*
  * Used with set_perms()   * Used with set_perms()
  */   */
 #define PERM_ROOT                0x00  #define PERM_ROOT                0x00
 #define PERM_USER                0x01  #define PERM_FULL_ROOT           0x01
 #define PERM_FULL_USER           0x02  #define PERM_USER                0x02
 #define PERM_SUDOERS             0x03  #define PERM_FULL_USER           0x03
 #define PERM_RUNAS               0x04  #define PERM_SUDOERS             0x04
   #define PERM_RUNAS               0x05
   
 /*  /*
  * Shortcuts for sudo_user contents.   * Shortcuts for sudo_user contents.
Line 119 
Line 124 
 #define user_passwd             (sudo_user.pw->pw_passwd)  #define user_passwd             (sudo_user.pw->pw_passwd)
 #define user_uid                (sudo_user.pw->pw_uid)  #define user_uid                (sudo_user.pw->pw_uid)
 #define user_gid                (sudo_user.pw->pw_gid)  #define user_gid                (sudo_user.pw->pw_gid)
 #define user_shell              (sudo_user.pw->pw_shell)  
 #define user_dir                (sudo_user.pw->pw_dir)  #define user_dir                (sudo_user.pw->pw_dir)
   #define user_shell              (sudo_user.shell)
 #define user_tty                (sudo_user.tty)  #define user_tty                (sudo_user.tty)
 #define user_cwd                (sudo_user.cwd)  #define user_cwd                (sudo_user.cwd)
 #define user_runas              (sudo_user.runas)  #define user_runas              (sudo_user.runas)
 #define user_cmnd               (sudo_user.cmnd)  #define user_cmnd               (sudo_user.cmnd)
 #define user_args               (sudo_user.cmnd_args)  #define user_args               (sudo_user.cmnd_args)
   #define user_path               (sudo_user.path)
 #define user_prompt             (sudo_user.prompt)  #define user_prompt             (sudo_user.prompt)
 #define user_host               (sudo_user.host)  #define user_host               (sudo_user.host)
 #define user_shost              (sudo_user.shost)  #define user_shost              (sudo_user.shost)
 #define safe_cmnd               (sudo_user.cmnd_safe)  #define safe_cmnd               (sudo_user.cmnd_safe)
 #define login_class             (sudo_user.class_name)  #define login_class             (sudo_user.class_name)
   #define runas_pw                (sudo_user._runas_pw)
   
 /*  /*
  * We used to use the system definition of PASS_MAX or _PASSWD_LEN,   * We used to use the system definition of PASS_MAX or _PASSWD_LEN,
Line 173 
Line 180 
 #ifndef HAVE_GETCWD  #ifndef HAVE_GETCWD
 char *getcwd            __P((char *, size_t size));  char *getcwd            __P((char *, size_t size));
 #endif  #endif
 #if !defined(HAVE_PUTENV) && !defined(HAVE_SETENV)  
 int putenv              __P((const char *));  
 #endif  
 #ifndef HAVE_SNPRINTF  #ifndef HAVE_SNPRINTF
 int snprintf            __P((char *, size_t, const char *, ...));  int snprintf            __P((char *, size_t, const char *, ...));
 #endif  #endif
Line 192 
Line 196 
 int strcasecmp          __P((const char *, const char *));  int strcasecmp          __P((const char *, const char *));
 #endif  #endif
 char *sudo_goodpath     __P((const char *));  char *sudo_goodpath     __P((const char *));
 void sudo_setenv                __P((char *, char *));  
 char *tgetpass          __P((const char *, int, int));  char *tgetpass          __P((const char *, int, int));
 int find_path           __P((char *, char **));  int find_path           __P((char *, char **, char *));
 void check_user         __P((void));  void check_user         __P((void));
 void verify_user        __P((struct passwd *, char *));  void verify_user        __P((struct passwd *, char *));
 int sudoers_lookup      __P((int));  int sudoers_lookup      __P((int));
 void set_perms          __P((int, int));  void set_perms_posix    __P((int, int));
   void set_perms_fallback __P((int, int));
 void remove_timestamp   __P((int));  void remove_timestamp   __P((int));
 int check_secureware    __P((char *));  int check_secureware    __P((char *));
 void sia_attempt_auth   __P((void));  void sia_attempt_auth   __P((void));
Line 210 
Line 214 
 char *estrdup           __P((const char *));  char *estrdup           __P((const char *));
 int easprintf           __P((char **, const char *, ...));  int easprintf           __P((char **, const char *, ...));
 int evasprintf          __P((char **, const char *, va_list));  int evasprintf          __P((char **, const char *, va_list));
   void dump_badenv        __P((void));
 void dump_defaults      __P((void));  void dump_defaults      __P((void));
 void dump_auth_methods  __P((void));  void dump_auth_methods  __P((void));
   void init_envtables     __P((void));
 int lock_file           __P((int, int));  int lock_file           __P((int, int));
 int touch               __P((char *, time_t));  int touch               __P((char *, time_t));
 int user_is_exempt      __P((void));  int user_is_exempt      __P((void));
 void set_fqdn           __P((void));  void set_fqdn           __P((void));
 char *sudo_getepw       __P((struct passwd *));  char *sudo_getepw       __P((struct passwd *));
   int pam_prep_user       __P((struct passwd *));
 YY_DECL;  YY_DECL;
   
 /* Only provide extern declarations outside of sudo.c. */  /* Only provide extern declarations outside of sudo.c. */
Line 228 
Line 235 
 extern char **Argv;  extern char **Argv;
 extern FILE *sudoers_fp;  extern FILE *sudoers_fp;
 extern int tgetpass_flags;  extern int tgetpass_flags;
   
   extern void (*set_perms) __P((int, int));
 #endif  #endif
 extern int errno;  extern int errno;
   

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.6.4.1