Commit Graph

4239 Commits

Author SHA1 Message Date
Todd C. Miller
5ae3bb2dd3 minor update 2007-12-10 22:12:34 +00:00
Todd C. Miller
51d8416545 regen 2007-12-10 15:56:23 +00:00
Todd C. Miller
3e7a467e81 sync 2007-12-08 00:17:21 +00:00
Todd C. Miller
ae98617dfe add -g support for LDAP 2007-12-08 00:09:28 +00:00
Todd C. Miller
3592cc0b18 The -i and -s flags can now take an optional command. 2007-12-03 16:36:49 +00:00
Todd C. Miller
74c5dc4fad Add passprompt_override flag to sudoers that will cause the prompt
to be overridden in all cases.  This flag is also set when the
user specifies the -p flag.
2007-12-02 17:13:48 +00:00
Todd C. Miller
4efd981d68 Move setting of login class until after sudoers has been parsed.
Set NewArgv[0] for -i after runas_pw has been set.
2007-12-02 00:51:32 +00:00
Todd C. Miller
c148eb52d6 Move the dgettext check. 2007-12-02 00:34:54 +00:00
Todd C. Miller
8694c73146 Add basic support for looking up the string "Password: " in the PAM
localized text db.  This allows us to determine whether the PAM
prompt is the default "Password: " one even if it has been localized.

TODO: concatenate non-std PAM prompts and user-specified sudo prompts.
2007-12-01 16:22:25 +00:00
Todd C. Miller
908b8f64e6 Use AC_FUNC_GETGROUPS instead of a home-grown attempt that was insufficient. 2007-11-27 23:40:50 +00:00
Todd C. Miller
a85dd4b861 Fix typos; Martynas Venckus 2007-11-27 17:13:03 +00:00
Todd C. Miller
9c5696978c Don't assume runas_pw is set; it may not be in the -g case. 2007-11-26 00:26:42 +00:00
Todd C. Miller
a766300007 Set aux group vector for PERM_RUNAS and restore group vector for
PERM_ROOT if we previously changed it.  Stash the runas group vector
so we don't have to call initgroups more than once. Also add no-op
check to check_perms.
2007-11-25 13:07:21 +00:00
Todd C. Miller
f9f4aca556 Add support for runas groups. This allows the user to run a command
with a different effective group.  If the -g option is specified
without -u the command will be run as the current user (only the
group will change).  the -g and -u options may be used together.
TODO: implement runas group for ldap
      improve runas group documentation
      add testsudoers support
2007-11-21 20:12:00 +00:00
Todd C. Miller
bfd781ff65 fix setting of mandir 2007-11-21 20:02:39 +00:00
Todd C. Miller
c9f393e4de document that ALL implies SETENV 2007-11-21 19:26:06 +00:00
Todd C. Miller
e6c0ba72f3 s/setenv_ok/setenv_implied/g 2007-11-21 18:50:47 +00:00
Todd C. Miller
fff47a319a hostname_matches() returns TRUE on match in sudo 1.7. 2007-11-21 18:44:48 +00:00
Todd C. Miller
4a39e1bebe use strcmp, not strcasecmp when comparing ALL 2007-11-21 18:26:59 +00:00
Todd C. Miller
6751e9a9cd Make sudo ALL imply setenv. Note that unlike with file-based sudoers
this does affect all the commands in the sudoRole.
2007-11-21 16:41:49 +00:00
Todd C. Miller
52b2861bb9 sudo "ALL" now implies the SETENV tag but, unlike an explicit tag, it
is not passed on to other commands in the list.
2007-11-21 16:05:31 +00:00
Todd C. Miller
87dc0bb2ea Add missing sudo_setpwent() and sudo_setgrent() calls. Also
use sudo_getpwuid() instead of getpwuid().
2007-11-21 16:02:30 +00:00
Todd C. Miller
8b1ada4a8f Expand on the dangers of not using visudo to edit sudoers. 2007-11-15 16:16:46 +00:00
Todd C. Miller
7cd59baada Don't quote *?[]! on output since the lexer does not strip off the
backslash when reading those in.
2007-11-08 12:24:41 +00:00
Todd C. Miller
5c61e13db4 expand "u_foo" types to "unsigned foo" to avoid compatibility issues. 2007-11-07 18:16:31 +00:00
Todd C. Miller
8ff6b6ccaa Refactor log line generation in to new_logline(). 2007-11-04 13:33:18 +00:00
Todd C. Miller
c22d295979 fix typo 2007-10-25 13:23:39 +00:00
Todd C. Miller
0d22c2f98d Add configure check for struct in6_addr instead of relying on AF_INET6
since some systems define AF_INET6 but do not include IPv6 support.
2007-10-24 16:41:19 +00:00
Todd C. Miller
c50e7d4c06 Fix block to add -lutil for FreeBSD and NetBSD when logincap is in use. 2007-10-21 13:29:18 +00:00
Todd C. Miller
8ef458b594 POSIX states that struct timespec be declared in time.h so check
there regardless of the value of TIME_WITH_SYS_TIME.
2007-10-20 02:28:40 +00:00
Todd C. Miller
45a382bba1 Instead of defining a macro to call the appropriate method for
turning on/off echo, just define tc[gs]etattr() and the related
defines that use the correct terminal ioctls if needed.
Also go back to using TCSAFLUSH instead of TCSADRAIN on all but QNX.
2007-10-17 15:37:30 +00:00
Todd C. Miller
f28aa7f8cc g/c @ALLOCA@ 2007-10-09 00:18:07 +00:00
Todd C. Miller
c3f2818416 regen 2007-10-09 00:07:25 +00:00
Todd C. Miller
5a04b3ff9d Add --disable-pam-session configure option to disable calling
pam_{open,close}_session.  May work around bugs in some PAM
implementations.
2007-10-09 00:04:48 +00:00
Todd C. Miller
f951605429 quiet gcc warnings 2007-10-08 16:00:59 +00:00
Todd C. Miller
c84ad26835 Avoid printing the prompt if we are already backgrounded.
E.g. if the user runs "sudo foo &" from the shell.  In this
case, the call to tcsetattr() will cause SIGTTOU to be delivered.
2007-10-08 12:41:08 +00:00
Todd C. Miller
209e35027f Reorder things such that the definition of env_reset come right
before the env variable lists.
2007-09-15 20:07:50 +00:00
Todd C. Miller
0b6ebf4d80 Shrink type and seqno in struct alias from int to u_short 2007-09-15 11:50:28 +00:00
Todd C. Miller
76e5eb434b Add a sequence number in the aliases for loop detection. If we find
an alias with the seqno already set to the current (global) value we
know we've visited it before so ignore it.
2007-09-15 11:24:54 +00:00
Todd C. Miller
4f5e88532f PAM wants the full tty path so add user_ttypath which holds the
full path to the tty or is NULL if no tty was present.
2007-09-13 23:05:34 +00:00
Todd C. Miller
bb07eea18f Set PAM_RHOST to work around a bug in Solaris 7 and lower that
results in a segv.
2007-09-13 22:42:15 +00:00
Todd C. Miller
57ee080a08 regen 2007-09-11 19:43:07 +00:00
Todd C. Miller
a0f80d6581 rename lh_ -> tq_ 2007-09-11 19:42:48 +00:00
Todd C. Miller
91526aaf74 remove some useless casts 2007-09-10 21:33:31 +00:00
Todd C. Miller
fde060e846 pull in inttypes.h for SIZE_MAX; we avoid stdint.h since inttypes.h predates the final C99 spec and the standard specifies that it shall include stdint.h anyway 2007-09-10 21:32:53 +00:00
Todd C. Miller
2c59eea84a Since we ship with a pre-generated parser there is no need to
ship a bogus alloca implementation.
2007-09-06 16:39:11 +00:00
Todd C. Miller
6cbee775b7 regen 2007-09-06 16:22:23 +00:00
Todd C. Miller
5803487885 remove initial setting of CHECKSIA, we require that it be unset if not used 2007-09-06 16:19:20 +00:00
Todd C. Miller
dda1fb26a3 add list.c to SRCS 2007-09-06 15:55:24 +00:00
Todd C. Miller
638d039ae9 regen 2007-09-06 11:18:13 +00:00