Commit Graph

5241 Commits

Author SHA1 Message Date
Todd C. Miller
96cb890d53 No need to look up shadow password unless we are doing password-style
authentication.  This moves the shadow password lookup to the auth
functions that need it.
2010-08-06 13:55:33 -04:00
Todd C. Miller
cb1848fab1 Retain final passwd/group refs until the policy close() function.
Note that this doesn't get called in all cases so putting
this in a cleanup function is probably better.
2010-08-06 13:54:35 -04:00
Todd C. Miller
9f27401359 Fix mismerge 2010-08-06 13:53:17 -04:00
Todd C. Miller
640f79e13a When removing/resetting the timestamp file ignore the tty ticket contents. 2010-08-06 12:07:21 -04:00
Todd C. Miller
26526e667f delref sudo_user.pw, runas_pw and runas_gr immediately before we return. 2010-08-06 12:07:03 -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
7b011cf152 fix typo 2010-08-04 08:42:05 -04:00
Todd C. Miller
ec57221017 Do not produce a warning for "sudo -k" if the ticket file does not
exist.
2010-08-03 15:16:57 -04:00
Todd C. Miller
65eec19bdc Instead of caching struct passwd and struct group in the red-black
tree, store a struct cache_item which includes both the key and
datum.  This allows us to user the actual name that was looked up
as the key instead of the contents of struct passwd or struct group.
This matters because the name in the database may not match what
we looked up, due either to case folding or truncation (historically
at 8 characters).  Also mark the disabled calls to sudo_freepwcache()
and sudo_freegrcache() as broken since we use cached data for things
like set_perms() and the logging functions.  Fixing this would
require making a copy of the structs for user and runas or adding
a reference count (better).
2010-08-03 15:15:45 -04:00
Todd C. Miller
4e74b389c2 Fix path to mkinstalldirs 2010-08-03 15:10:56 -04:00
Todd C. Miller
420db23714 Quiet gcc warnings on glibc systems that use warn_unused_result for
write(2) and others.
2010-08-03 11:17:56 -04:00
Todd C. Miller
1229406720 Add %option noinput 2010-08-02 18:17:51 -04:00
Todd C. Miller
ea79ea4467 Add cross-compile defaults for remaining AC_TRY_RUN usage.
Also add back getgroups() check since AC_FUNC_GETGROUPS defaults
to "no" when cross-compiling.
2010-08-02 15:32:06 -04:00
Todd C. Miller
24a755bfe7 Use AC_CHECK_MEMBER in SUDO_SOCK_SA_LEN
Use AC_TYPE_LONG_LONG_INT and AC_CHECK_SIZEOF([long int]) instead
    of rolling our own.
2010-07-31 21:19:46 -04:00
Todd C. Miller
7861b4afdf Update to latest version 2010-07-29 10:25:08 -04:00
Todd C. Miller
e4ff63bd30 Let pp determine pp_aix_version itself. 2010-07-28 17:52:54 -04:00
Todd C. Miller
6d0395ee68 Add support for Ubuntu admin flag file and enable it when building
Ubuntu packages.
2010-07-28 16:34:11 -04:00
Todd C. Miller
76ce69057e Add commented out SuSE-like targetpw settings 2010-07-28 16:28:14 -04:00
Todd C. Miller
036a9d81bd Only try to use +DAportable for non-GCC on hppa 2010-07-28 16:27:45 -04:00
Todd C. Miller
5c7335e23e Prevent configure from adding the -g flag unless in devel mode 2010-07-28 09:24:55 -04:00
Todd C. Miller
1ae6145d47 Go back to sudo-flavor to match existing packages and only use an
underscore for those that need it.
2010-07-27 18:22:47 -04:00
Todd C. Miller
a4b333bc44 Use sudo_$flavor instead of sudo-$flavor since that causes the
least amount of trouble for the various package managers.
2010-07-27 18:17:36 -04:00
Todd C. Miller
a6265c54c3 Fix handling of the ldap flavor
Remove destdir unless --debug was specified
Make distclean before running configure if there is a Makefile present
2010-07-27 18:10:34 -04:00
Todd C. Miller
0fbe7a6748 Add back include file. 2010-07-27 14:51:15 -04:00
Todd C. Miller
707246a348 Pass extra args on to configure
on HP-UX, if we don't have the HP C compiler, disable zlib to
prevent gcc from finding it in /usr/local/lib.
2010-07-27 14:49:53 -04:00
Todd C. Miller
01e547bd1e Use the HP ANSI C compiler on HP-UX if possible 2010-07-27 14:26:59 -04:00
Todd C. Miller
5d06ad3b6b Some getline() implementations (FreeBSD 8.0) do not ignore the
length pointer when the line pointer is NULL as they should.
2010-07-27 10:48:35 -04:00
Todd C. Miller
c33bf93509 Don't need to check for *cp being non-zero, isdigit() will do that. 2010-07-27 10:12:24 -04:00
Todd C. Miller
18d25e96f0 Add setlocale() so the command line arguments that use floating
point work in different locales.  Since sudo now logs the timing
data in the C locale we must Parse the seconds in the timing file
manually instead of using strtod().  Furthermore, sudo 1.7.3 logged
the number of seconds with the user's locale so if the decimal point
is not '.' try using the locale-specific version.
2010-07-27 09:49:54 -04:00
Todd C. Miller
e11e4efb8f Do I/O logging in the C locale so the floating point numbers in the
timing file are not locale-dependent.
2010-07-27 09:45:20 -04:00
Todd C. Miller
a3e4db1244 Use errorx() not error() for thingsthat don't set errno. 2010-07-27 07:50:43 -04:00
Todd C. Miller
14909efc66 Better support for 1.2.3 style versions in Tru64 kits 2010-07-26 15:30:42 -04:00
Todd C. Miller
2e66c22a3b Add Tru64 kit support 2010-07-26 15:30:36 -04:00
Todd C. Miller
af182aed7d Remove apparently unnecessary use of sudo 2010-07-26 15:00:34 -04:00
Todd C. Miller
c59ad3596c Create timedir as part of install-dirs target. 2010-07-26 14:26:54 -04:00
Todd C. Miller
23c96fbc2e Handle ENXIO from read/write which can occur when reading/writing
a pty that has gone away.
2010-07-26 13:04:11 -04:00
Todd C. Miller
4168fcf2dd sudo_pwdup() was not expanding an empty pw_shell to _PATH_BSHELL 2010-07-26 12:34:42 -04:00
Todd C. Miller
1eebebeece platform is a pp flag not a variable 2010-07-26 11:34:56 -04:00
Todd C. Miller
551791a51f Add simple arg parsing for mkpkg so we can set debug, flavor or platform. 2010-07-26 11:15:50 -04:00
Todd C. Miller
d02489ff40 Make rpm backend work on AIX 5.x 2010-07-26 11:14:04 -04:00
Todd C. Miller
a346ba8df5 Add commented out Defaults entry for log_output 2010-07-25 13:12:49 -04:00
Todd C. Miller
a4b3a6d966 Remove sudo docdir completely 2010-07-23 12:22:10 -04:00
Todd C. Miller
084ae523ac Add sample sudo.conf 2010-07-23 12:21:22 -04:00
Todd C. Miller
aeac8822b4 Add PACKAGE_TARNAME for docdir 2010-07-22 07:58:02 -04:00
Todd C. Miller
06a918b88f Pass install-sh -b~ here too. 2010-07-23 11:26:18 -04:00
Todd C. Miller
092a6935e1 Install binary files with -b~ to make a backup.
Fixes "text file busy" error on HP-UX during install.
2010-07-23 11:23:53 -04:00
Todd C. Miller
49d82a04e7 "mv -f" on HP-UX doesn't unlink the destination first so add
an explicit rm before moving the temporary into place.
2010-07-23 11:22:44 -04:00
Todd C. Miller
5ba4a35a78 Some more ${foo} -> $(foo) conversion for consistent Makefiles. 2010-07-23 09:33:19 -04:00
Todd C. Miller
c016ecf006 Install sudoers2ldif in the doc dir 2010-07-23 09:12:03 -04:00
Todd C. Miller
258a26d391 Add missing include of maillock.h for Solaris 2010-07-22 18:44:48 -04:00