Todd C. Miller
c31ed2cd22
Handle duplicate variables in the environment. For unsetenv(),
...
keep looking even after remove the first instance. For sudo_putenv(),
check for and remove dupes after we replace an existing value.
2010-05-28 09:42:50 -04:00
Todd C. Miller
12aedc6757
Use explicit path to source file instead of $< for files that live
...
in devdir and top_srcdir.
2010-05-27 18:11:51 -04:00
Todd C. Miller
a8bb0ea0aa
Add explicit rules to compile gram.c and toke.c for HP-UX
...
Pevent ending LIBSUDOERS_OBJS with a backslash
2010-05-27 18:00:08 -04:00
Todd C. Miller
62f470a575
Link libcommon before libreplace since libcommon may use functions
...
only present in libreplace.
2010-05-27 17:48:17 -04:00
Todd C. Miller
c4feed1ccd
Move code common to sudo and the sudoers plugin to a convenience library,
...
libcommon. Removes the need to make links in the sudoers plugin dir
and reduces re-compilation of duplicate object files.
2010-05-27 17:29:09 -04:00
Todd C. Miller
b8b006a885
Move code common to sudo and the sudoers plugin to a convenience library,
...
libcommon. Removes the need to make links in the sudoers plugin dir
and reduces re-compilation of duplicate object files.
2010-05-27 17:27:36 -04:00
Todd C. Miller
9773ba3f79
Rename script_execve to sudo_execve and rename script_foo in exec.c
2010-05-27 16:46:31 -04:00
Todd C. Miller
4248a11ef7
rename script.c exec.c and fix up the MANIFEST file
2010-05-27 16:32:41 -04:00
Todd C. Miller
f8f82ffa8e
Rename script_setup() to pty_setup() and call from script_execve()
...
directly.
2010-05-27 16:29:48 -04:00
Todd C. Miller
349fedb022
bump version to 1.8.0a2
2010-05-27 15:09:05 -04:00
Todd C. Miller
0b6a687bf4
Document init_session
2010-05-27 15:07:43 -04:00
Todd C. Miller
b2ed46652b
Clean up the sudoers auth API a bit and update the docs.
2010-05-27 14:53:11 -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
a0646aa4ad
Add explicit rule to build getdate.o for HP-UX make.
2010-05-26 17:20:21 -04:00
Todd C. Miller
f14d3dca1e
Back out most of change 45e406ebdea2. Create dummy .l.c and .y.c
...
rules as an alternate way to prevent HP-UX make (and others) from
trying to rebuild the parser in non-dev mode.
2010-05-26 17:01:00 -04:00
Todd C. Miller
4695dd1b70
Re-enable PATH_MAX check for command
2010-05-26 16:33:35 -04:00
Todd C. Miller
c7d685b90a
For distclean, clean the main directory last since the subdirs
...
need to be able to run libtool to clean things.
2010-05-26 16:10:24 -04:00
Todd C. Miller
acc60712e5
Fix generation of mksiglist.h
2010-05-26 15:43:46 -04:00
Todd C. Miller
efa908448d
Now that we defer sending cstat until the end of script_child()
...
we cannot reuse cstat when reading command status from parent.
2010-05-26 11:19:17 -04:00
Todd C. Miller
807d1313a5
Use numeric registers to handle conditionals instead of trying
...
to do it all with text processing.
2010-05-25 16:13:04 -04:00
Todd C. Miller
5dd8e98ec7
Document per-command SELinux settings
2010-05-25 14:43:39 -04:00
Todd C. Miller
45923111e0
Repair "sudo -l -U username"
2010-05-25 14:21:21 -04:00
Todd C. Miller
937b5f166d
Set selinux role and type in command details.
2010-05-25 13:58:16 -04:00
Todd C. Miller
2942edcbd0
Rework SELinux support.
2010-05-25 11:00:39 -04:00
Todd C. Miller
5f857e6e54
Make SELinux support compile again. Needs more work to be complete.
2010-05-24 18:18:50 -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
79cb53c62c
Use mandoc(1) if nroff(1) is not present.
2010-05-24 12:35:43 -04:00
Todd C. Miller
b519f7a097
Use the --file argument to config.status instead of setting CONFIG_FILES
...
in the environment.
2010-05-24 12:25:20 -04:00
Todd C. Miller
5dd7fd4305
We cannot conditionally update gram.h or the dependency ordering gets
...
messed up in devel mode.
2010-05-24 12:10:05 -04:00
Todd C. Miller
8a8830e34f
Substitute @SHELL@ into Makefiles
2010-05-21 21:29:44 -04:00
Todd C. Miller
222a4f7c8a
Fix typo
2010-05-21 21:05:44 -04:00
Todd C. Miller
755752c6b1
Update to autoconf 2.65
2010-05-21 19:25:17 -04:00
Todd C. Miller
815e401281
Fix libtool target (space vs. tabs)
2010-05-21 18:41:18 -04:00
Todd C. Miller
8ae8e8442c
Remove use of RETSIGTYPE; all modern systems have signal handlers that
...
return void.
2010-05-21 18:40:04 -04:00
Todd C. Miller
51b558e753
Update to libtool-2.2.6b. I haven't made any local modifications
...
this time, which should be OK since we install sudo_noexec.so by
hand now.
2010-05-21 17:59:47 -04:00
Todd C. Miller
6b370cb020
Use libtool to clean objects
2010-05-21 16:53:21 -04:00
Todd C. Miller
a60f268a7c
Install sudo_plugin.h as part of "make install" and make other install
...
targets callable from the top-level Makefile
2010-05-21 16:52:31 -04:00
Todd C. Miller
60b5321558
regen with autoupdate to eliminate AC_TRY_LINK
2010-05-21 15:53:39 -04:00
Todd C. Miller
95d939f9bb
Install sudo_plugin.h as part of "make install" and make other install
...
targets callable from the top-level Makefile
2010-05-21 15:31:36 -04:00
Todd C. Miller
b628e15dc4
The sample plugin doesn't support being run with no args so return
...
a usage error in this case.
2010-05-21 14:56:31 -04:00
Todd C. Miller
f59669fc20
Set close on exec flag for descriptors used for I/O logging so they
...
are not present in the command being run.
2010-05-21 14:51:50 -04:00
Todd C. Miller
d3d8364d4e
Set close on exec flag in private versions of setpwent() and setgrent().
2010-05-21 14:51:05 -04:00
Todd C. Miller
16c2769ed9
Close the I/O pipes aftering dup2()ing them to std{in,out,err}.
...
Fixes extra fds being present in the command when it is part of a pipeline.
2010-05-21 14:50:26 -04:00
Todd C. Miller
529bfcf674
Set user_tty to "unknown" if there is no tty, like sudo 1.7 does
...
(it is used when logging). Note that user_ttypath will still be
NULL if there is no tty.
2010-05-21 12:19:55 -04:00
Todd C. Miller
064cffd575
Cosmetic changes:
...
add comments, remove orphaned prototype and make a global static.
2010-05-21 12:01:11 -04:00
Todd C. Miller
a9a16d7331
Move check for maxfd == -1 to flush_output where it belongs.
2010-05-20 17:34:53 -04:00
Todd C. Miller
d18b458e1f
Break out of select loop if all the fds we want to select on are -1.
2010-05-20 17:13:22 -04:00
Todd C. Miller
20c125297f
Avoid possible malloc(0) if plugin returns an empty groups list.
2010-05-20 17:10:16 -04:00