Commit Graph

113 Commits

Author SHA1 Message Date
Todd C. Miller
3b8b88407f Add __unused to rcsids 2005-01-27 15:42:30 +00:00
Todd C. Miller
2c2daa8eca Use: #include <config.h>
Not: #include "config.h"
That way we get the correct config.h when build dir != src dir
2004-11-19 18:39:14 +00:00
Todd C. Miller
806fac8892 Remove trailing spaces, no actual code changes. 2004-06-06 23:58:11 +00:00
Todd C. Miller
f8176ceda2 Use SA_INTERRUPT so SunOS works correctly, avoid stdio and just use read/write
as it is simpler.
2004-05-28 22:06:50 +00:00
Todd C. Miller
47b833d4c2 Use alarm() instead of select() for the timeout for systems that don't
fully/properly implement select().
2004-05-28 20:24:13 +00:00
Todd C. Miller
a6849607c9 Preliminary changes to support nsr-tandem-nsk. Based on patches from
Tom Bates.
2004-05-17 20:08:46 +00:00
Todd C. Miller
5befe6ddfe More to a less restrictive, ISC-style license. 2004-02-13 21:36:44 +00:00
Todd C. Miller
c4a8ab8b99 Use the SET, CLR and ISSET macros. 2004-01-29 22:33:58 +00:00
Todd C. Miller
4e74e8c530 add DARPA credit on affected files 2003-04-16 00:42:10 +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
0cc2362d4c Use TCSETAF, not TCSETA to set terminal in termio case 2001-12-17 23:56:47 +00:00
Todd C. Miller
540ba42877 Catch SIGTTIN and SIGTTOU too and treat them like SIGTSTP. 2001-12-15 05:40:12 +00:00
Todd C. Miller
65fad4df35 o Reorder some headers and use STDC_HEADERS define properly
o Update copyright year
2001-12-14 19:52:54 +00:00
Todd C. Miller
b1dd45403c flags set in signal handlers should be volatile sig_atomic_t 2001-12-14 06:53:25 +00:00
Todd C. Miller
d38e57ef48 Use sigaction_t and quiet a gcc warning. 2001-12-09 05:27:11 +00:00
Todd C. Miller
6d6d4628f4 Add support for interrupting/suspending tgetpass via keyboard input.
If you suspend sudo from the password prompt and resume it will
re-prompt you.
2001-12-09 05:14:23 +00:00
Todd C. Miller
2d9fb0a5ab select() may return EAGAIN. If so, continue like we do for EINTR. 2001-04-13 01:42:50 +00:00
Todd C. Miller
d76537718b When writing prompt, no need to write the NUL as well; hag@linnaean.org 2000-08-11 19:41:28 +00:00
Todd C. Miller
54fbe08545 Added -S flag (read passwd from stdin) and tgetpass_flags global
that holds flags to be passed in to tgetpass().  Change echo_off
param to tgetpass() into a flags field.  There are currently 2
possible flags for tgetpass(): TGP_ECHO and TGP_STDIN.  In tgetpass(),
abstract the echo set/clear via macros and if (flags & TGP_ECHO)
but echo is not set on the terminal, but sure to set it.
2000-02-27 03:49:07 +00:00
Todd C. Miller
de44c711bb Fixed a bug that caused an infinite loop when the password timeout was disabled. 2000-02-27 03:11:23 +00:00
Todd C. Miller
9e0bae9fc6 update copyright year on changed files 2000-01-17 23:46:26 +00:00
Todd C. Miller
58fb4fc86b End on \r as well as \n 2000-01-11 18:17:50 +00:00
Todd C. Miller
c6136f9764 crank version to 1.6 1999-12-05 02:18:47 +00:00
Todd C. Miller
68fd7e74c1 When read()'ing, do a single character at a time to be sure we don't go
oast the newline.
1999-11-01 15:58:46 +00:00
Todd C. Miller
3f1581ae66 Make this work again for things like "sudo echo hi | more" where the tty
gets put into character at a time mode.  We read until we read end of
line or we run out of space (similar to fgets(3)).
1999-11-01 04:00:57 +00:00
Todd C. Miller
2c4fefde5a o Add requiretty option
o Move O_NOCTTY to compat.h
1999-10-08 01:12:50 +00:00
Todd C. Miller
cc82693f58 add O_NOCTTY when opening /dev/tty just in case 1999-10-07 21:13:45 +00:00
Todd C. Miller
db4cac1740 don't need limits.h 1999-08-22 17:09:49 +00:00
Todd C. Miller
0d732401f4 add 4th term to license similar to term 5 in the apache license 1999-07-31 16:19:50 +00:00
Todd C. Miller
dd312cee2f o BSD copyright
o no need to block signals, we now do that in main()
o cosmetic changes
1999-07-22 12:58:39 +00:00
Todd C. Miller
69a00325ec New (correct) PAM code
Tgetpass now takes an echo flag for use with PAM_PROMPT_ECHO_ON
Block SIGINT and SIGTSTP during auth
remove a useless umask setting
Change error from BAD_ALLOCATION -> BAD_AUTH_INIT (for use with sia/PAM)
Some cosmetic changes to auth.c for consistency
1999-07-05 20:14:21 +00:00
Todd C. Miller
1eab167a30 Fix open(2) return value checking, was NULL for fopen, should be -1 for open 1999-06-03 16:34:10 +00:00
Todd C. Miller
80287c981c Move interface-related defines to interfaces.h so we don't have to include
<netinet/in.h> everywhere.
1999-05-17 01:36:30 +00:00
Todd C. Miller
850a52aa6f o Replace _PASSWD_LEN braindeath with our own SUDO_MAX_PASS.
It turns out the old DES crypt does the right thing with passwords
   longert than 8 characters.
 o Fix common typo (necesary -> necessary)
 o Update TODO list
1999-05-14 16:30:14 +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
e6deacb6c4 Crank version to 1.6 and combine copyright statements 1999-04-05 20:57:25 +00:00
Todd C. Miller
79c46d1c81 ++version 1999-03-29 04:05:15 +00:00
Todd C. Miller
52916f16ac add explicate copyright 1999-02-03 04:32:19 +00:00
Todd C. Miller
826fe213f2 add sudo tags 1999-01-17 23:16:20 +00:00
Todd C. Miller
d3aaf52283 crank version and regen files 1999-01-17 22:40:55 +00:00
Todd C. Miller
62dba8f4d1 more -Wall 1998-11-18 04:16:13 +00:00
Todd C. Miller
c253188f55 -Wall 1998-11-18 03:51:10 +00:00
Todd C. Miller
b751a2b9c4 the prompt is expanded before tgetpass is called 1998-11-03 20:03:31 +00:00
Todd C. Miller
7ffee3b997 getprpwuid is broken in HP-UX 10.20 at least (it sleeps for 2 minutes if the
shadow files don't exist).
1998-10-21 23:50:10 +00:00
Todd C. Miller
3d92a1bb92 new dunix shadow code, use dispcrypt(3) 1998-10-19 18:32:39 +00:00
Todd C. Miller
bb8c2e2a74 if select return < -1 still prompt for pw 1998-10-15 04:10:44 +00:00
Todd C. Miller
a05c2b96b4 catch EINTR in select and restart 1998-10-15 03:28:21 +00:00
Todd C. Miller
1c66c857e4 new shadow password scheme. Always include shadow support if the
platform supports it and the user did not disable it via configure
1998-09-21 04:00:56 +00:00
Todd C. Miller
0ef9f25d7e updated version 1998-09-17 16:27:15 +00:00