Todd C. Miller
f454727bb8
Merge compat.h and missing.h into missing.h
2010-08-16 14:05:44 -04:00
Todd C. Miller
6bcd9efc0c
Use gettimeofday() directly instead of via the gettime() wrapper.
2010-08-10 13:50:40 -04:00
Todd C. Miller
0186018d3d
Reference count cached passwd and group structs. The cache holds
...
one reference itself and another is added by sudo_getgr{gid,nam}
and sudo_getpw{uid,nam}. The final ref on the runas and user passwd
and group structs are persistent for now.
2010-08-04 09:58:50 -04:00
Todd C. Miller
d9de7b5f8e
Add support for a sudo-i pam.d file to be used for "sudo -i".
...
Adapted from a RedHat patch.
2010-07-12 17:57:53 -04:00
Todd C. Miller
e6b48d415c
Replace built-in non-unix group support with a sudoers group plugin.
...
Include a sample plugin that can read Unix-format group files.
2010-07-02 11:11:25 -04:00
Todd C. Miller
30fe4a067c
Set usrinfo for AIX
...
Set adminstrative domain for the process when looking up user's
password or group info and when preparing for execve().
Include strings.h even if string.h exists since they may define
different things. Fixes warnings on AIX and others.
2010-06-29 13:08:05 -04:00
Todd C. Miller
9a16dc514d
Add stub declarations for struct stat and struct timeval
2010-06-16 17:10:04 -04:00
Todd C. Miller
b72a530fd0
Update copyright year
2010-06-14 12:19:49 -04:00
Todd C. Miller
3430618c78
Make all functions in ldap.c static
2010-06-14 10:37:42 -04:00
Todd C. Miller
eec336115a
Move askpass path specification from sudoers to sudo.conf.
2010-06-09 17:40:44 -04:00
Todd C. Miller
39e072c713
Make env_init() void as it never fails.
2010-06-08 10:23:35 -04:00
Todd C. Miller
b6f02f38c0
Make sudoers_io functions static to iolog.c
2010-05-29 10:43:34 -04:00
Todd C. Miller
7e6d1d1f7d
Add init_session function to struct policy_plugin that gets called
...
before the uid/gid/etc changes. A struct passwd pointer is passed in,which may be NULL if the user does not exist in the passwd database.The sudoers module uses init_session to open the pam session as needed.
2010-05-27 14:46:39 -04:00
Todd C. Miller
27be96c9cd
Add open/close session to sudo auth, only used by PAM.
...
This allows us to open (and close) the PAM session from sudoers.
2010-05-26 17:57:47 -04:00
Todd C. Miller
0487aee6b4
Bring back closefrom settings.
2010-05-24 15:40:36 -04:00
Todd C. Miller
60e0e496ef
If running a command or sudoedit in transcript mode, call io_nextid()
...
before log_allowed() so the session id is logged.
2010-05-24 14:30:54 -04:00
Todd C. Miller
55ef027d88
Add argc and argv to I/O logger open function.
2010-05-17 10:38:56 -04:00
Todd C. Miller
d5bfd148d6
Make find_path() a little more generic by not checking def_foo
...
variables inside it. Instead, pass in ignore_dot as a function
argument.
2010-05-13 10:27:03 -04:00
Todd C. Miller
9fbec34fed
Add pointer to a printf like function to plugin open functon.
...
This can be used instead of the conversation function to display
info and error messages.
2010-05-04 19:17:31 -04:00
Todd C. Miller
13966481c7
Add print_error() function that uses the conversation function to
...
print a variable number of error strings and use it in log_error().
2010-05-03 16:53:05 -04:00
Todd C. Miller
b041c91caf
Re-enable environment files and setting environment variables on the
...
command line.
2010-04-26 17:14:11 -04:00
Todd C. Miller
4b04e875ed
Move fileops.c defines and prototypes to filesops.h
2010-04-23 06:02:39 -04:00
Todd C. Miller
c17d3e061d
Remove extraneous bits and classify by source file.
2010-04-22 17:40:01 -04:00
Todd C. Miller
6a27866c30
get_boottime() now fills in a timeval struct
2010-04-22 10:33:16 -04:00
Todd C. Miller
1bb9f62143
Convert perm setting to push/pop model; still needs some work
...
Use the stashed runas groups instead of using getgrouplist()
Reset perms to the initial value on error
2010-04-20 17:00:31 -04:00
Todd C. Miller
b4a26b7691
Use timeval directly instead of converting to timespec when dealing
...
with file times and time of day.
2010-04-20 16:44:02 -04:00
Todd C. Miller
257133328d
Ansify env.c
2010-04-17 13:28:36 -04:00
Todd C. Miller
0df204052f
Remove remaining references to the environ pointer.
2010-04-17 13:26:03 -04:00
Todd C. Miller
744eae82e7
Primitive set/restore permissions. Will be replaced by a push/pop
...
model.
2010-04-10 10:34:37 -04:00
Todd C. Miller
05e8023e78
Add back io logging (transcript) support. Currently, the open function
...
runs too early and it is not possible to use the io module independently
of the policy module.
2010-03-27 20:19:40 -04:00
Todd C. Miller
6b180d24da
Fix the -s and -i flags and add support for the "implied_shell"
...
option. If the user does not specify a command, sudo will now pass
in the path to the user's shell and set impied_shell=true. The
plugin can them either check the command normally or return -2 to
cause sudo to print a usage message and exit.
2010-03-21 08:54:06 -04:00
Todd C. Miller
b4f4afdf69
Pass in output function to lbuf_init() instead of writing to stdout.
...
A side effect is that the usage info can now go to stderr as it should.
2010-03-18 06:42:17 -04:00
Todd C. Miller
038ec569de
Use number of tty columns that is passed in user_info instead of
...
getting it directly in the lbuf code.
2010-03-17 21:25:32 -04:00
Todd C. Miller
d5ae4c7d87
Kill __P in sudoers
2010-03-17 19:56:27 -04:00
Todd C. Miller
248bae4e56
Add support for -k flag with a command.
2010-03-15 19:41:15 -04:00
Todd C. Miller
9b0205846b
Initial bits of sudoers plugin; still needs work.
2010-03-14 19:58:47 -04:00
Todd C. Miller
e90fa482f9
Rework source layout in preparation for modular sudo.
2010-02-20 09:14:01 -05:00