Todd C. Miller
e05905dd16
checkpoint
2004-12-17 18:12:20 +00:00
Todd C. Miller
bb76440b4f
sort usage
2004-12-16 19:20:25 +00:00
Todd C. Miller
0b1ef8ff53
Sort command line options
2004-12-16 19:20:12 +00:00
Todd C. Miller
051a2110a4
Add closefrom sudoers option to start closing at a point other than 3.
...
Add closefrom_override sudoers option and -C sudo flag to allow the
user to specify a different closefrom starting point.
2004-12-16 18:33:49 +00:00
Todd C. Miller
74c19b024a
Add _PATH_DEVNULL for those without it.
2004-12-16 18:25:54 +00:00
Todd C. Miller
2c9dc5a69b
no more UCB strcasecmp
2004-12-16 03:55:46 +00:00
Todd C. Miller
b9a727023a
replace BSD licensed one with version derived from pdksh
2004-12-16 03:54:48 +00:00
Todd C. Miller
f93cd1e97a
Fix last commit.
2004-12-10 02:07:27 +00:00
Todd C. Miller
07d74adfba
Make sure stdin, stdout and stderr are open and dup them to /dev/null
...
if not.
2004-12-10 00:26:22 +00:00
Todd C. Miller
1936aeb299
add sudo_ldap_close
2004-12-03 18:57:48 +00:00
Todd C. Miller
7d488657f0
Use TIME_WITH_SYS_TIME
2004-12-03 18:52:28 +00:00
Todd C. Miller
9884923a9c
Add TIME_WITH_SYS_TIME_H
2004-12-03 18:48:07 +00:00
Todd C. Miller
48dae86b8f
Add missing braces to avoid DYLD_FORCE_FLAT_NAMESPACE being set
...
unconditionally on darwin. From Toby Peterson.
2004-12-02 16:18:29 +00:00
Todd C. Miller
77a7ab659a
Check rbinsert() return value. In the case of faked up entries there
...
is usually a negative response cached that we need to overwrite.
In pwfree() don't try to zero out a NULL pw_passwd pointer.
2004-12-02 15:40:00 +00:00
Todd C. Miller
d88e6523a3
Use the double fork trick to avoid the monitor process being waited
...
for by the main program run through sudo.
2004-12-02 14:53:20 +00:00
Todd C. Miller
68e54d2c8b
Call initgroups() in -U mode so group matches work normally.
2004-11-29 17:52:02 +00:00
Todd C. Miller
51fbe264f1
Don't print a trailing comma for the last entry in enum def_tupple
2004-11-29 17:34:09 +00:00
Todd C. Miller
9c88441420
Mention values when lecture, listpw and verifypw are used in boolean context.
2004-11-28 21:08:09 +00:00
Todd C. Miller
f5c359ee06
verifypw when used in a boolean TRUE context should be "all", not "any".
2004-11-28 21:05:38 +00:00
Todd C. Miller
57ab7279b1
Allow tuples that can be used as booleans to be used as boolean TRUE.
...
In this case the 2nd possible value of the tuple is used for TRUE.
2004-11-26 19:21:08 +00:00
Todd C. Miller
8ed367de8f
Correct the test for 2-parameter timespecsub
2004-11-25 17:23:27 +00:00
Todd C. Miller
d72a4e9c24
Add strub struct definitions for passwd, timeval and timespec
2004-11-25 17:20:57 +00:00
Todd C. Miller
33db4b2edb
Add check for 2-argument form of timespecsub (FreeBSD and BSD/OS) and
...
fix a typo in the gettimeofday check.
2004-11-25 17:09:31 +00:00
Todd C. Miller
94f606fbf6
Deal with user_stat being NULL as it is for visudo and testsudoers.
2004-11-24 21:44:54 +00:00
Todd C. Miller
5f06b19a6e
Add -U option to use in conjunction with -l instead of -u.
...
Add support for "sudo -l command" to test a specific command.
2004-11-24 21:31:51 +00:00
Todd C. Miller
f75a034f06
Set safe_cmnd after sudoers_lookup() if it has not been set.
...
Previously it was set by sudo "ALL" in the parser but at that point
the fully-qualified pathname has not yet been found.
2004-11-24 21:28:55 +00:00
Todd C. Miller
9c526bdc30
Correctly handle multiple privileges per userspec and runas inheritence.
2004-11-23 23:18:15 +00:00
Todd C. Miller
f2bdbda17f
Zero out sd_un for each entry in sudo_defs_table in init_defaults.
2004-11-21 19:09:47 +00:00
Todd C. Miller
77cd81f41d
make per-command defaults work with sudoedit
2004-11-19 23:04:14 +00:00
Todd C. Miller
e605070143
Remove the FLAG_NOPASS, FLAG_NOEXEC and FLAG_MONITOR flags. Instead,
...
we just set the approriate defaults variable.
2004-11-19 23:00:28 +00:00
Todd C. Miller
9c954d803f
Document per-command Defaults.
2004-11-19 22:09:10 +00:00
Todd C. Miller
fe869025c4
Add support for command-specific Defaults entries. E.g.
...
Defaults!/usr/bin/vi noexec
2004-11-19 21:35:12 +00:00
Todd C. Miller
0cddfc3684
Change an occurence of user_matches() -> runas_matches() missed previously
...
runas_matches(), host_matches() and cmnd_matches() only really need to pass in
a list of members. user_matches() still needs to pass in a passwd struct
because of "sudo -l"
2004-11-19 20:03:33 +00:00
Todd C. Miller
2c3cff1704
Check def_authenticate, def_noexec and def_monitor when setting return flags.
...
XXX May be better to just set the defaults directly and get rid of those flags.
2004-11-19 19:46:55 +00:00
Todd C. Miller
2c2daa8eca
Use: #include <config.h>
...
Not: #include "config.h"
That way we get the correct config.h when build dir != src dir
2004-11-19 18:39:14 +00:00
Todd C. Miller
bb60da6bba
Back out part of rev 1.263; fix -I order
2004-11-19 18:30:43 +00:00
Todd C. Miller
faa9a89722
More robust parsing if #include; could be much better still.
2004-11-19 18:12:59 +00:00
Todd C. Miller
6a78b91949
Make arg splitting in visudo and sudoedit consistent.
2004-11-19 17:55:14 +00:00
Todd C. Miller
07139128f7
Split alias routines out into their own file.
2004-11-19 17:35:21 +00:00
Todd C. Miller
55d6af8463
__attribute__ is already defined in compat.h
2004-11-19 17:32:25 +00:00
Todd C. Miller
3f9ee04fbb
quit() should not be __noreturn__ as it is non-void on some platforms.
2004-11-19 17:30:22 +00:00
Todd C. Miller
a414762c4e
Add local error/warning functions like err/warn but that call an additional
...
cleanup routine in the error case. This means we no longer need to compile
a special version of alloc.o for visudo.
2004-11-19 17:24:20 +00:00
Todd C. Miller
f38c58574a
Clarify comments about the data structures
2004-11-19 16:54:55 +00:00
Todd C. Miller
75ad6b81a2
Add support for VISUAL and EDITOR containing command line args.
...
If env_editor is not set any args in VISUAL and EDITOR are ignored.
Arguments are also now supported in def_editor.
2004-11-18 20:28:53 +00:00
Todd C. Miller
cf02ff7f52
alias_matches() is no more
2004-11-17 19:25:54 +00:00
Todd C. Miller
0e71bf81ac
sync
2004-11-17 19:09:21 +00:00
Todd C. Miller
81f5587329
When regenerating the parser, don't replace gram.h unless it has changed.
2004-11-17 18:19:45 +00:00
Todd C. Miller
761695f324
remove Makefile.binary for distclean
2004-11-17 16:56:25 +00:00
Todd C. Miller
b2ef18bbd3
Preserve KRB5CCNAME in zero_env() and add a paranoia check to make sure
...
we can't overflow new_env.
2004-11-17 16:18:33 +00:00
Todd C. Miller
88ce50751e
paranoia when stripping trailing slashes from tempdir.
2004-11-17 15:33:45 +00:00