Commit Graph

2169 Commits

Author SHA1 Message Date
Todd C. Miller
6b91a87a9f set $LOGNAME when we set $USER 1999-05-03 16:00:32 +00:00
Todd C. Miller
52ff801d8b add comment about digital unix and interfaces.c warning with gcc 1999-04-27 04:00:11 +00:00
Todd C. Miller
276ea3cbe1 use modern paths and give examples for some of the new parser features 1999-04-15 05:12:46 +00:00
Todd C. Miller
16fdb0a5c5 fix comment 1999-04-10 17:03:32 +00:00
Todd C. Miller
06e586ee7b Function names should be flush with the start of the line so they can be found trivially in an editor and with grep 1999-04-10 04:49:03 +00:00
Todd C. Miller
eecc5ce1c9 free(3) is already void, no need to cast it 1999-04-10 04:40:57 +00:00
Todd C. Miller
8e8fbc251e catch case where cmnd_safe is not set (this should not be possible) 1999-04-10 04:37:35 +00:00
Todd C. Miller
59b0cff8cf Stash the "safe" path (ie: the one listed in sudoers) to the command instead
of stashing the struct stat.  Should be safer.
1999-04-10 04:10:01 +00:00
Todd C. Miller
0ef9c81f16 notes on updating from an earlier release 1999-04-08 23:56:13 +00:00
Todd C. Miller
f1891c8796 updated 1999-04-08 00:20:03 +00:00
Todd C. Miller
622b7a1d97 You can now specifiy a host list instead of just a host or alias.
Ie: user = host1,host2,ALIAS,!host3 my_command
now works.
1999-04-07 23:18:52 +00:00
Todd C. Miller
3a8971f654 Quiet -Wall 1999-04-07 06:59:59 +00:00
Todd C. Miller
91e31132dd Move the push from the beginning of cmndspec to the end. This means we
no longer have to do a push at the end of privilege, just reset some values.
1999-04-07 06:50:47 +00:00
Todd C. Miller
2d8c7c0812 runas-lists and NOPASSWD/PASSWD modifiers are now sticky and you can use "!" most everywhere 1999-04-07 00:24:36 +00:00
Todd C. Miller
0d2e2e9f3c modernize paths and update su example based on sample.sudoers one 1999-04-06 18:12:08 +00:00
Todd C. Miller
5d78a954e7 New runas semantics 1999-04-06 18:06:12 +00:00
Todd C. Miller
0d67007d1b In estrdup(), do the malloc ourselves so we don't need to rely on the
system strdup(3) which may or may not exist.  There is now no need to
provide strdup() for those w/o it.  Also, the prototype for estrdup()
was wrong, it returns char * and its param is const.
1999-04-06 17:55:01 +00:00
Todd C. Miller
29523f3494 $Sudo tag 1999-04-06 17:40:49 +00:00
Todd C. Miller
ecb8d08e2e buf should be prompt; Michael Robokoff <mrobo@networkcs.com> 1999-04-06 17:20:39 +00:00
Todd C. Miller
f50a342b4e It is now possible to use the '!' operator in a runas list as
well as in a Cmnd_Alias, Host_Alias and User_Alias.
1999-04-06 05:40:51 +00:00
Todd C. Miller
d53f3818ad Kill GLOBAL_NO_SPW_ENT (not used) and crank GLOBAL_PROBLEM 1999-04-06 05:38:59 +00:00
Todd C. Miller
1818ace053 Definitions of *_matched were wrong--user top, not top-2 as subscript. 1999-04-06 05:08:40 +00:00
Todd C. Miller
499e869237 Add VALIDATE_NOT_OK_NOPASS for when user is not allowed to run a command
but the NOPASSWD flag was set.
Make runasspec, runaslist, runasuser, and nopasswd typeless in parse.yacc
Add support for '!' in the runas list
Fix double printing of '%' and '+' for groups and netgroups respectively
Add *_matched macros (no need for local stack variable).  Should only be
used directly after a pop (since top must be >= 2).
1999-04-06 05:00:29 +00:00
Todd C. Miller
9284e417ca Add copyright, somewhat silly 1999-04-06 03:25:46 +00:00
Todd C. Miller
e6deacb6c4 Crank version to 1.6 and combine copyright statements 1999-04-05 20:57:25 +00:00
Todd C. Miller
9a9dc3fabc Use ! not ^ to do negation 1999-04-05 20:30:15 +00:00
Todd C. Miller
094a29a66b regen 1999-04-05 20:29:54 +00:00
Todd C. Miller
4f6f75ae35 Make runas and NOPASSWD tags persistent across entris in a command list.
Add a PASSWD tag to reverse NOPASSWD.  When you override a runas or *PASSWD
tag the value given becomes the new default for the rest of the command list.
1999-04-05 20:28:16 +00:00
Todd C. Miller
321906bfb5 update for 1.5.9 1999-04-02 21:03:17 +00:00
Todd C. Miller
a234aee2c6 Shift return value of system(3) by 8 to get real exit value and if it is not 1 or 0 print the retval along with the error message. 1999-04-02 21:02:57 +00:00
Todd C. Miller
1116756bff testsudoers needs LIBOBJS too 1999-03-30 21:45:27 +00:00
Todd C. Miller
49c5a12d8c Fix another parser bug. For a sudoers entry like this:
millert	ALL=/bin/ls,(daemon) !/bin/ls
sudo would not allow millert to run ls as root.
1999-03-30 17:17:54 +00:00
Todd C. Miller
b3f330600e new change 1999-03-30 06:08:42 +00:00
Todd C. Miller
baae4d4dd9 Save entries that match a ! command on the matching stack too 1999-03-30 06:03:38 +00:00
Todd C. Miller
1b56f53a40 Make sudo's usage info better when mutually exclusive args are given and don't rely on argument order to detect this; nick@zeta.org.au 1999-03-30 06:01:46 +00:00
Todd C. Miller
2c7a8ba7b4 updates from CU 1999-03-29 20:03:02 +00:00
Todd C. Miller
3f7ace9eed use gzip 1999-03-29 04:38:06 +00:00
Todd C. Miller
75fb22990f Fix off by one error introduced in *alloc changes 1999-03-29 04:31:16 +00:00
Todd C. Miller
79c46d1c81 ++version 1999-03-29 04:05:15 +00:00
Todd C. Miller
382ef75493 Use emalloc/erealloc/estrdup 1999-03-29 02:59:34 +00:00
Todd C. Miller
d8947486ec error checking memory allocation routines 1999-03-29 01:29:02 +00:00
Todd C. Miller
e4b42c5eac Still not right, this fixes it for real 1999-03-29 00:23:49 +00:00
Todd C. Miller
b789f9e932 Fix for previous commit 1999-03-29 00:08:02 +00:00
Todd C. Miller
217710df36 Fix a parser bug that was exposed when mixing different runas specs
and ! commands.  For example:
    millert        ALL=(daemon) /usr/bin/whoami,!/bin/ls
would allow millert to run whoami as root as well as daemon when it should
just allow daemon.  The problem was that comma-separated commands in
a list shared the same entry on the matching stack.  Now they get
their own entry iff there is a full match.  It may be better to just make
the runas spec persistent across all commands in a list like the user
and host entries of the matching stack.  However, since that is a
fairly major change it should gets its own minor rev increase.
1999-03-29 00:05:15 +00:00
Todd C. Miller
bd76c13333 Simplify PAM code and fix a PAM-related warning on Linux 1999-03-28 18:50:25 +00:00
Todd C. Miller
37873b23d5 updates 1999-03-26 18:17:43 +00:00
Todd C. Miller
56b0eb23fc better su entry 1999-03-26 18:12:22 +00:00
Todd C. Miller
07b9914ed0 regen 1999-03-26 18:10:25 +00:00
Todd C. Miller
c38c66b2b2 new pam code that works on solaris, should work on linux too; aelberg@home.com 1999-03-26 18:09:09 +00:00
Todd C. Miller
958ccf5214 more entries 1999-03-19 19:44:46 +00:00