Commit Graph

3095 Commits

Author SHA1 Message Date
Todd C. Miller
804caf3956 Use snprintf() for paranoia 2003-03-12 23:46:54 +00:00
Todd C. Miller
35b2800a8a Use emalloc2 and erealloc3 2003-03-12 22:16:13 +00:00
Todd C. Miller
6cb46fd4e0 strlc{at,py} for those w/o it 2003-03-12 22:08:29 +00:00
Todd C. Miller
cfa77cedee stlc{at,py} for those w/o it. 2003-03-12 22:07:36 +00:00
Todd C. Miller
285791c42f Add stlc{at,py} for those w/o it. 2003-03-12 22:07:26 +00:00
Todd C. Miller
838ec0a2ca Add erealloc3(), a realloc() version of emalloc2(). 2003-03-12 21:51:39 +00:00
Todd C. Miller
c96a62e26c Use emalloc2() to allocate N things of a certain size. 2003-03-12 21:45:51 +00:00
Todd C. Miller
8b4248529e Add emalloc2() -- like calloc() but w/o the bzero and with error/oflow
checking.
2003-03-12 21:41:22 +00:00
Todd C. Miller
8e041c3f35 Error out on malloc(0); suggested by theo 2003-03-12 21:23:40 +00:00
Todd C. Miller
450a561933 fix a typo; David Krause 2003-03-10 00:34:09 +00:00
Todd C. Miller
fc387e982d fix typo 2003-03-07 15:46:18 +00:00
Todd C. Miller
466216fe8e Remove DYLD_ from the environment for MacOS X; from bbraun 2003-03-04 02:47:24 +00:00
Todd C. Miller
7a7a5fe2e0 not not; Anil Madhavapeddy 2003-03-01 18:21:20 +00:00
Todd C. Miller
4a48a0f679 typos; jmc@openbsd.org 2003-01-23 08:03:51 +00:00
Todd C. Miller
b34e373908 Add some missing ';' rule terminators that bison warns about. 2003-01-20 21:13:42 +00:00
Todd C. Miller
5478ef4e29 fix typo I introduced in last merge 2003-01-20 21:07:51 +00:00
Todd C. Miller
f1b0329256 regenerate with autoconf 2.57 2003-01-20 20:59:08 +00:00
Todd C. Miller
dfd0d2829d Add missing "$HOME" 2003-01-20 20:58:48 +00:00
Todd C. Miller
cf76450aef Add some more square backets to make autoconf 2.57 happy 2003-01-20 20:57:51 +00:00
Todd C. Miller
fe79cba0b3 Updates from autoconf-2.57 2003-01-20 19:39:04 +00:00
Todd C. Miller
e73dd504b3 Updates from autoconf-2.57 2003-01-20 19:39:04 +00:00
Todd C. Miller
270e6cab72 regen 2003-01-17 23:10:05 +00:00
Todd C. Miller
26d9f4856f regen 2003-01-17 23:10:05 +00:00
Todd C. Miller
a8153f4d5d Add support for Defaults>RunasUser 2003-01-17 23:09:45 +00:00
Todd C. Miller
6e118c64b5 fclose() yyin after each yyparse() is done and use fopen() instead of
using freopen().
2003-01-07 00:10:04 +00:00
Todd C. Miller
8b3c38d20c 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.
2003-01-07 00:02:33 +00:00
Todd C. Miller
cce84a1811 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.
2003-01-06 23:47:04 +00:00
Todd C. Miller
35cf881d76 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.
2003-01-06 20:06:12 +00:00
Todd C. Miller
e27e963f2b Fix pasto/thinko in setresgid()/setregid() usage.
Want to set effective gid, not real gid, when reading sudoers.
2002-12-15 16:24:24 +00:00
Todd C. Miller
1996179bf2 don't compile set_perms_posix if we have setreuid or setresuid 2002-12-15 16:08:32 +00:00
Todd C. Miller
3bfbd4b1e3 document new prompt escapes 2002-12-14 19:21:27 +00:00
Todd C. Miller
0b0f8d6d32 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.
2002-12-14 19:15:30 +00:00
Todd C. Miller
4f9ed308f0 Write the prompt *after* turning off echo to avoid some password characters
being echoed on heavily-loaded machines with fast typists.
2002-12-13 18:20:34 +00:00
Todd C. Miller
412151ce7a Add support for mipseb; wiz@danbala.tuwien.ac.at 2002-12-13 18:09:04 +00:00
Todd C. Miller
c8fa231120 Fix IRIX fallout from name changes in man dir/sect Makefile variables.
Patch from erici AT motown DOT cc DOT utexas DOT edu
2002-12-13 17:48:11 +00:00
Todd C. Miller
b49046433a Keep a local copy of tgetpass_flags so we don't add in TGP_ECHO to
the global copy.  Problem noted by Peter Pentchev.
2002-12-13 16:33:26 +00:00
Todd C. Miller
d26b608279 regen 2002-11-28 23:43:35 +00:00
Todd C. Miller
5bf742d282 Add missing yyerror() calls; YYERROR does not seem to call this for us. 2002-11-28 23:43:22 +00:00
Todd C. Miller
897b551372 fix typo in comment; Pedro Bastos 2002-11-26 17:09:59 +00:00
Todd C. Miller
f7e9532012 document --disable-setresuid 2002-11-22 19:41:31 +00:00
Todd C. Miller
abb4e1ad35 Sprinkle some volatile qualifiers to prevent over-enthusiastic
optimizers from removing memset() calls.
2002-11-22 19:41:13 +00:00
Todd C. Miller
fd140ff5da minor sign fixes pointed out by gcc -Wsign-compare 2002-11-22 19:11:47 +00:00
Todd C. Miller
b152da4cdb 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).
2002-11-22 19:09:49 +00:00
Todd C. Miller
2de61320b3 regen from configure.in 2002-11-22 19:08:10 +00:00
Todd C. Miller
736660571d Add checks for setresuid() and a way to disable using it 2002-11-22 19:07:04 +00:00
Todd C. Miller
351fcc1386 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.
2002-11-22 19:05:02 +00:00
Todd C. Miller
faabf3bac7 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.
2002-11-22 18:33:47 +00:00
Todd C. Miller
4f2d87e28c 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
2002-11-22 18:23:24 +00:00
Todd C. Miller
06cd79be8e update ftp link for bison 2002-09-19 21:27:59 +00:00
Todd C. Miller
d497949e68 Error out if setusercontext() fails and the runas user is not root. 2002-07-20 12:30:45 +00:00