]> granicus.if.org Git - sudo/log
sudo
21 years agoCast [ug]ids to unsigned long and printf with %lu
Todd C. Miller [Sat, 15 Mar 2003 20:19:58 +0000 (20:19 +0000)]
Cast [ug]ids to unsigned long and printf with %lu

21 years agoregen
Todd C. Miller [Sat, 15 Mar 2003 20:17:06 +0000 (20:17 +0000)]
regen

21 years agocorrect error messages for --with-sudoers-{mode,uid,gid}
Todd C. Miller [Sat, 15 Mar 2003 20:16:58 +0000 (20:16 +0000)]
correct error messages for --with-sudoers-{mode,uid,gid}

21 years agomake the malloc(0) error specific to each function to aid tracking down
Todd C. Miller [Sat, 15 Mar 2003 20:10:42 +0000 (20:10 +0000)]
make the malloc(0) error specific to each function to aid tracking down
bugs.

21 years agodeal with platforms where size_t is signed and there is no SIZE_MAX or SIZE_T_MAX
Todd C. Miller [Sat, 15 Mar 2003 19:49:28 +0000 (19:49 +0000)]
deal with platforms where size_t is signed and there is no SIZE_MAX or SIZE_T_MAX

21 years agoMake this compile w/ Heimdal and fix some gcc warnings.
Todd C. Miller [Sat, 15 Mar 2003 19:10:38 +0000 (19:10 +0000)]
Make this compile w/ Heimdal and fix some gcc warnings.

21 years agoUse stat_sudoers macro so --with-stow can work
Todd C. Miller [Sat, 15 Mar 2003 18:02:02 +0000 (18:02 +0000)]
Use stat_sudoers macro so --with-stow can work

21 years agoAdd support for --with-stow based on patches from Robert Uhl
Todd C. Miller [Sat, 15 Mar 2003 18:01:39 +0000 (18:01 +0000)]
Add support for --with-stow based on patches from Robert Uhl

21 years agofix indentation
Todd C. Miller [Sat, 15 Mar 2003 17:51:45 +0000 (17:51 +0000)]
fix indentation

21 years agoback out rev 1.352
Todd C. Miller [Sat, 15 Mar 2003 05:21:43 +0000 (05:21 +0000)]
back out rev 1.352

21 years agoregen
Todd C. Miller [Sat, 15 Mar 2003 01:11:51 +0000 (01:11 +0000)]
regen

21 years agouse strlcpy, not strncpy
Todd C. Miller [Sat, 15 Mar 2003 01:11:26 +0000 (01:11 +0000)]
use strlcpy, not strncpy

21 years agoFix typo; check pw_uid, not pw_gid after setusercontext() failure.
Todd C. Miller [Sat, 15 Mar 2003 00:48:34 +0000 (00:48 +0000)]
Fix typo; check pw_uid, not pw_gid after setusercontext() failure.

21 years agouse pid_t
Todd C. Miller [Sat, 15 Mar 2003 00:43:51 +0000 (00:43 +0000)]
use pid_t

21 years agoMake gcc shutup about unused rcsid
Todd C. Miller [Fri, 14 Mar 2003 15:43:49 +0000 (15:43 +0000)]
Make gcc shutup about unused rcsid

21 years agoMove the n == 0 check for the non-getifaddrs cas
Todd C. Miller [Fri, 14 Mar 2003 15:35:54 +0000 (15:35 +0000)]
Move the n == 0 check for the non-getifaddrs cas

21 years agoskeychallenge() on NetBSD take a size parameter
Todd C. Miller [Fri, 14 Mar 2003 02:47:55 +0000 (02:47 +0000)]
skeychallenge() on NetBSD take a size parameter

21 years agoregen
Todd C. Miller [Fri, 14 Mar 2003 02:38:13 +0000 (02:38 +0000)]
regen

21 years agoput -ldl after -lpam, not before; fixes static linking on Linux
Todd C. Miller [Fri, 14 Mar 2003 02:38:06 +0000 (02:38 +0000)]
put -ldl after -lpam, not before; fixes static linking on Linux

21 years agoAvoid malloc(0) and fix the loop invariant for the getifaddrs() case.
Todd C. Miller [Fri, 14 Mar 2003 02:17:38 +0000 (02:17 +0000)]
Avoid malloc(0) and fix the loop invariant for the getifaddrs() case.

21 years agoregen
Todd C. Miller [Fri, 14 Mar 2003 01:24:37 +0000 (01:24 +0000)]
regen

21 years agoregen
Todd C. Miller [Fri, 14 Mar 2003 01:24:30 +0000 (01:24 +0000)]
regen

21 years agoPreserve copyright notice from .pod file in .man.in file
Todd C. Miller [Fri, 14 Mar 2003 01:23:19 +0000 (01:23 +0000)]
Preserve copyright notice from .pod file in .man.in file

21 years agoAdd sudoers(5) to SEE ALSO
Todd C. Miller [Fri, 14 Mar 2003 01:01:04 +0000 (01:01 +0000)]
Add sudoers(5) to SEE ALSO

21 years agoregen
Todd C. Miller [Thu, 13 Mar 2003 20:27:38 +0000 (20:27 +0000)]
regen

21 years agoDon't assume libc can realloc() a NULL string.
Todd C. Miller [Thu, 13 Mar 2003 20:27:09 +0000 (20:27 +0000)]
Don't assume libc can realloc() a NULL string.
If malloc/realloc fails, make sure we just return; yyerror() is not terminal.

21 years agoregen
Todd C. Miller [Thu, 13 Mar 2003 20:17:41 +0000 (20:17 +0000)]
regen

21 years agosimplify fill_args a little and use strlcpy for paranoia
Todd C. Miller [Thu, 13 Mar 2003 20:17:14 +0000 (20:17 +0000)]
simplify fill_args a little and use strlcpy for paranoia

21 years agoregen
Todd C. Miller [Thu, 13 Mar 2003 20:02:20 +0000 (20:02 +0000)]
regen

21 years agoUse strlc{at,py} for paranoia's sake and exit on overflow. In all
Todd C. Miller [Thu, 13 Mar 2003 20:00:45 +0000 (20:00 +0000)]
Use strlc{at,py} for paranoia's sake and exit on overflow.  In all
cases the strings were either pre-allocated to the correct size of
length checks were done before the copy but a little paranoia can
go a long way.

21 years agoAdd strlc{at,py} protos
Todd C. Miller [Thu, 13 Mar 2003 17:54:04 +0000 (17:54 +0000)]
Add strlc{at,py} protos

21 years agoUse erealloc3()
Todd C. Miller [Thu, 13 Mar 2003 17:03:23 +0000 (17:03 +0000)]
Use erealloc3()

21 years agoregen
Todd C. Miller [Thu, 13 Mar 2003 17:00:51 +0000 (17:00 +0000)]
regen

21 years agoOflow test of nmemb > SIZE_MAX / size is fine (don't need >=).
Todd C. Miller [Thu, 13 Mar 2003 17:00:31 +0000 (17:00 +0000)]
Oflow test of nmemb > SIZE_MAX / size is fine (don't need >=).
Use memcpy() instead of strcpy() in estrdup() so this is strcpy()-free.

21 years agosnprintf() a uid as %lu, not %ld to match the MAX_UID_T_LEN test in
Todd C. Miller [Thu, 13 Mar 2003 16:58:25 +0000 (16:58 +0000)]
snprintf() a uid as %lu, not %ld to match the MAX_UID_T_LEN test in
configure.

21 years agoIn MAX_UID_T_LEN test cast uid_t to unsigned long, just unsigned.
Todd C. Miller [Thu, 13 Mar 2003 16:56:38 +0000 (16:56 +0000)]
In MAX_UID_T_LEN test cast uid_t to unsigned long, just unsigned.

21 years agoUse snprintf() for paranoia
Todd C. Miller [Wed, 12 Mar 2003 23:46:54 +0000 (23:46 +0000)]
Use snprintf() for paranoia

21 years agoUse emalloc2 and erealloc3
Todd C. Miller [Wed, 12 Mar 2003 22:16:13 +0000 (22:16 +0000)]
Use emalloc2 and erealloc3

21 years agostrlc{at,py} for those w/o it
Todd C. Miller [Wed, 12 Mar 2003 22:08:29 +0000 (22:08 +0000)]
strlc{at,py} for those w/o it

21 years agostlc{at,py} for those w/o it.
Todd C. Miller [Wed, 12 Mar 2003 22:07:36 +0000 (22:07 +0000)]
stlc{at,py} for those w/o it.

21 years agoAdd stlc{at,py} for those w/o it.
Todd C. Miller [Wed, 12 Mar 2003 22:07:26 +0000 (22:07 +0000)]
Add stlc{at,py} for those w/o it.

21 years agoAdd erealloc3(), a realloc() version of emalloc2().
Todd C. Miller [Wed, 12 Mar 2003 21:51:39 +0000 (21:51 +0000)]
Add erealloc3(), a realloc() version of emalloc2().

21 years agoUse emalloc2() to allocate N things of a certain size.
Todd C. Miller [Wed, 12 Mar 2003 21:45:51 +0000 (21:45 +0000)]
Use emalloc2() to allocate N things of a certain size.

21 years agoAdd emalloc2() -- like calloc() but w/o the bzero and with error/oflow
Todd C. Miller [Wed, 12 Mar 2003 21:41:22 +0000 (21:41 +0000)]
Add emalloc2() -- like calloc() but w/o the bzero and with error/oflow
checking.

21 years agoError out on malloc(0); suggested by theo
Todd C. Miller [Wed, 12 Mar 2003 21:23:40 +0000 (21:23 +0000)]
Error out on malloc(0); suggested by theo

21 years agofix a typo; David Krause
Todd C. Miller [Mon, 10 Mar 2003 00:34:09 +0000 (00:34 +0000)]
fix a typo; David Krause

21 years agofix typo
Todd C. Miller [Fri, 7 Mar 2003 15:46:18 +0000 (15:46 +0000)]
fix typo

21 years agoRemove DYLD_ from the environment for MacOS X; from bbraun
Todd C. Miller [Tue, 4 Mar 2003 02:47:24 +0000 (02:47 +0000)]
Remove DYLD_ from the environment for MacOS X; from bbraun

21 years agonot not; Anil Madhavapeddy
Todd C. Miller [Sat, 1 Mar 2003 18:21:20 +0000 (18:21 +0000)]
not not; Anil Madhavapeddy

22 years agotypos; jmc@openbsd.org
Todd C. Miller [Thu, 23 Jan 2003 08:03:51 +0000 (08:03 +0000)]
typos; jmc@openbsd.org

22 years agoAdd some missing ';' rule terminators that bison warns about.
Todd C. Miller [Mon, 20 Jan 2003 21:13:42 +0000 (21:13 +0000)]
Add some missing ';' rule terminators that bison warns about.

22 years agofix typo I introduced in last merge
Todd C. Miller [Mon, 20 Jan 2003 21:07:51 +0000 (21:07 +0000)]
fix typo I introduced in last merge

22 years agoregenerate with autoconf 2.57
Todd C. Miller [Mon, 20 Jan 2003 20:59:08 +0000 (20:59 +0000)]
regenerate with autoconf 2.57

22 years agoAdd missing "$HOME"
Todd C. Miller [Mon, 20 Jan 2003 20:58:48 +0000 (20:58 +0000)]
Add missing "$HOME"

22 years agoAdd some more square backets to make autoconf 2.57 happy
Todd C. Miller [Mon, 20 Jan 2003 20:57:51 +0000 (20:57 +0000)]
Add some more square backets to make autoconf 2.57 happy

22 years agoUpdates from autoconf-2.57
Todd C. Miller [Mon, 20 Jan 2003 19:39:04 +0000 (19:39 +0000)]
Updates from autoconf-2.57

22 years agoUpdates from autoconf-2.57
Todd C. Miller [Mon, 20 Jan 2003 19:39:04 +0000 (19:39 +0000)]
Updates from autoconf-2.57

22 years agoregen
Todd C. Miller [Fri, 17 Jan 2003 23:10:05 +0000 (23:10 +0000)]
regen

22 years agoregen
Todd C. Miller [Fri, 17 Jan 2003 23:10:05 +0000 (23:10 +0000)]
regen

22 years agoAdd support for Defaults>RunasUser
Todd C. Miller [Fri, 17 Jan 2003 23:09:45 +0000 (23:09 +0000)]
Add support for Defaults>RunasUser

22 years agofclose() yyin after each yyparse() is done and use fopen() instead of
Todd C. Miller [Tue, 7 Jan 2003 00:10:04 +0000 (00:10 +0000)]
fclose() yyin after each yyparse() is done and use fopen() instead of
using freopen().

22 years agoBetter fix for sudoers files w/o a newline before EOF. It looks
Todd C. Miller [Tue, 7 Jan 2003 00:02:33 +0000 (00:02 +0000)]
Better fix for sudoers files w/o a newline before EOF.  It looks
like the issue is that yyrestart() does not reset the start condition
to INITIAL which is an issue since we parse sudoers multiple times.

22 years agoWork around what appears to be a flex bug when dealing with files
Todd C. Miller [Mon, 6 Jan 2003 23:47:04 +0000 (23:47 +0000)]
Work around what appears to be a flex bug when dealing with files
that lack a final newline before EOF.  This adds a rule to match
EOF in the non-initial states which resets the state to INITIAL and
throws an error.

22 years agoo The parser needs sudoers to end with a newline but some editors (emacs) may
Todd C. Miller [Mon, 6 Jan 2003 20:06:12 +0000 (20:06 +0000)]
o The parser needs sudoers to end with a newline but some editors (emacs) may
  not add one.  Check for a missing newline at EOF and add one if needed.
o Set quiet flag during initial sudoers parse (to get options)
o Move yyrestart() call and always use freopen() to open yyin after
  initial sudoers parse.

22 years agoFix pasto/thinko in setresgid()/setregid() usage.
Todd C. Miller [Sun, 15 Dec 2002 16:24:24 +0000 (16:24 +0000)]
Fix pasto/thinko in setresgid()/setregid() usage.
Want to set effective gid, not real gid, when reading sudoers.

22 years agodon't compile set_perms_posix if we have setreuid or setresuid
Todd C. Miller [Sun, 15 Dec 2002 16:08:32 +0000 (16:08 +0000)]
don't compile set_perms_posix if we have setreuid or setresuid

22 years agodocument new prompt escapes
Todd C. Miller [Sat, 14 Dec 2002 19:21:27 +0000 (19:21 +0000)]
document new prompt escapes

22 years agoAdd %U and %H escapes and redo prompt rewriting. "%%" now gets collapsed
Todd C. Miller [Sat, 14 Dec 2002 19:15:30 +0000 (19:15 +0000)]
Add %U and %H escapes and redo prompt rewriting.  "%%" now gets collapsed
to "%" as was originally intended.  This also gets rid of lastchar (does
lookahead instead of lookback) which should simplify the logic slightly.

22 years agoWrite the prompt *after* turning off echo to avoid some password characters
Todd C. Miller [Fri, 13 Dec 2002 18:20:34 +0000 (18:20 +0000)]
Write the prompt *after* turning off echo to avoid some password characters
being echoed on heavily-loaded machines with fast typists.

22 years agoAdd support for mipseb; wiz@danbala.tuwien.ac.at
Todd C. Miller [Fri, 13 Dec 2002 18:09:04 +0000 (18:09 +0000)]
Add support for mipseb; wiz@danbala.tuwien.ac.at

22 years agoFix IRIX fallout from name changes in man dir/sect Makefile variables.
Todd C. Miller [Fri, 13 Dec 2002 17:48:11 +0000 (17:48 +0000)]
Fix IRIX fallout from name changes in man dir/sect Makefile variables.
Patch from erici AT motown DOT cc DOT utexas DOT edu

22 years agoKeep a local copy of tgetpass_flags so we don't add in TGP_ECHO to
Todd C. Miller [Fri, 13 Dec 2002 16:33:26 +0000 (16:33 +0000)]
Keep a local copy of tgetpass_flags so we don't add in TGP_ECHO to
the global copy.  Problem noted by Peter Pentchev.

22 years agoregen
Todd C. Miller [Thu, 28 Nov 2002 23:43:35 +0000 (23:43 +0000)]
regen

22 years agoAdd missing yyerror() calls; YYERROR does not seem to call this for us.
Todd C. Miller [Thu, 28 Nov 2002 23:43:22 +0000 (23:43 +0000)]
Add missing yyerror() calls; YYERROR does not seem to call this for us.

22 years agofix typo in comment; Pedro Bastos
Todd C. Miller [Tue, 26 Nov 2002 17:09:59 +0000 (17:09 +0000)]
fix typo in comment; Pedro Bastos

22 years agodocument --disable-setresuid
Todd C. Miller [Fri, 22 Nov 2002 19:41:31 +0000 (19:41 +0000)]
document --disable-setresuid

22 years agoSprinkle some volatile qualifiers to prevent over-enthusiastic
Todd C. Miller [Fri, 22 Nov 2002 19:41:13 +0000 (19:41 +0000)]
Sprinkle some volatile qualifiers to prevent over-enthusiastic
optimizers from removing memset() calls.

22 years agominor sign fixes pointed out by gcc -Wsign-compare
Todd C. Miller [Fri, 22 Nov 2002 19:11:47 +0000 (19:11 +0000)]
minor sign fixes pointed out by gcc -Wsign-compare

22 years agoRevamp set_perms. We now use a version based on setresuid() or setreuid()
Todd C. Miller [Fri, 22 Nov 2002 19:09:49 +0000 (19:09 +0000)]
Revamp set_perms.  We now use a version based on setresuid() or setreuid()
when possible since that allows us to support the stay_setuid option and
we always know exactly what the semantics will be (various Linux kernels
have broken POSIX saved uid support).

22 years agoregen from configure.in
Todd C. Miller [Fri, 22 Nov 2002 19:08:10 +0000 (19:08 +0000)]
regen from configure.in

22 years agoAdd checks for setresuid() and a way to disable using it
Todd C. Miller [Fri, 22 Nov 2002 19:07:04 +0000 (19:07 +0000)]
Add checks for setresuid() and a way to disable using it

22 years agoNo long need to emulate set*[ug]id() via setres[ug]id() or setre[ug]id().
Todd C. Miller [Fri, 22 Nov 2002 19:05:02 +0000 (19:05 +0000)]
No long need to emulate set*[ug]id() via setres[ug]id() or setre[ug]id().
The new set_perms stuff only uses things it knows are there.

22 years agoBefore exec, restore state of signal handlers to be the same as
Todd C. Miller [Fri, 22 Nov 2002 18:33:47 +0000 (18:33 +0000)]
Before exec, restore state of signal handlers to be the same as
when we were initialy invoked instead of just reseting to SIG_DFL.
Fixes a problem when using sudo with nohup.  Based on a patch from
Paul Markham.

22 years agoo timestamp_uid should be uid_t, not int
Todd C. Miller [Fri, 22 Nov 2002 18:23:24 +0000 (18:23 +0000)]
o timestamp_uid should be uid_t, not int
o clarify error message when sudo is run by root and no_root_sudo is set

22 years agoupdate ftp link for bison
Todd C. Miller [Thu, 19 Sep 2002 21:27:59 +0000 (21:27 +0000)]
update ftp link for bison

22 years agoError out if setusercontext() fails and the runas user is not root.
Todd C. Miller [Sat, 20 Jul 2002 12:30:45 +0000 (12:30 +0000)]
Error out if setusercontext() fails and the runas user is not root.

22 years agoFix rcsid
Todd C. Miller [Mon, 20 May 2002 20:51:23 +0000 (20:51 +0000)]
Fix rcsid

22 years agoFix SecurID API test
Todd C. Miller [Mon, 20 May 2002 20:50:41 +0000 (20:50 +0000)]
Fix SecurID API test

22 years agotypo in comment
Todd C. Miller [Fri, 17 May 2002 17:20:57 +0000 (17:20 +0000)]
typo in comment

22 years agosecurid5 stuff needs pthreads. Just adding -lpthread is suboptimal
Todd C. Miller [Fri, 17 May 2002 17:20:09 +0000 (17:20 +0000)]
securid5 stuff needs pthreads.  Just adding -lpthread is suboptimal
but I don't see a better way at the moment.

22 years agoSecurID API version 5 support from Michael Stroucken
Todd C. Miller [Fri, 17 May 2002 17:04:10 +0000 (17:04 +0000)]
SecurID API version 5 support from Michael Stroucken

22 years agoAdd check for SecurID 5.0 API
Todd C. Miller [Fri, 17 May 2002 17:02:35 +0000 (17:02 +0000)]
Add check for SecurID 5.0 API

22 years agoWe actually do still need config.h to get the 'const' definition for K&R C.
Todd C. Miller [Wed, 8 May 2002 20:46:47 +0000 (20:46 +0000)]
We actually do still need config.h to get the 'const' definition for K&R C.

22 years agoregen with autoconf 2.5.3
Todd C. Miller [Sun, 5 May 2002 20:43:15 +0000 (20:43 +0000)]
regen with autoconf 2.5.3

22 years agoDon't set sysconfdir to '/etc' if the user has specified a --prefix.
Todd C. Miller [Sun, 5 May 2002 20:25:10 +0000 (20:25 +0000)]
Don't set sysconfdir to '/etc' if the user has specified a --prefix.

22 years agoSome fixes for autoconf 2.53 from Robert Uhl
Todd C. Miller [Sun, 5 May 2002 20:14:59 +0000 (20:14 +0000)]
Some fixes for autoconf 2.53 from Robert Uhl
 o don't AC_SUBST LIBOBJS
 o force a 4th arg for AC_CHECK_HEADER() to workaround a bug

22 years agoNo need for dump_badenv() now that dump_defaults() knows how to dump lists.
Todd C. Miller [Sun, 5 May 2002 19:58:29 +0000 (19:58 +0000)]
No need for dump_badenv() now that dump_defaults() knows how to dump lists.

22 years ago++version
Todd C. Miller [Sun, 5 May 2002 01:31:57 +0000 (01:31 +0000)]
++version

22 years agodocument timestampowner
Todd C. Miller [Sun, 5 May 2002 00:57:47 +0000 (00:57 +0000)]
document timestampowner

22 years agoDon't call set_perms() when doing timestamp stuff unless timestamp_uid != 0.
Todd C. Miller [Sun, 5 May 2002 00:45:51 +0000 (00:45 +0000)]
Don't call set_perms() when doing timestamp stuff unless timestamp_uid != 0.