]> granicus.if.org Git - sudo/log
sudo
12 years agoMention HP-UX pam.conf settings.
Todd C. Miller [Fri, 28 Sep 2012 13:05:31 +0000 (09:05 -0400)]
Mention HP-UX pam.conf settings.

12 years agoSplit off timestamp functions into their own source file.
Todd C. Miller [Thu, 27 Sep 2012 14:21:13 +0000 (10:21 -0400)]
Split off timestamp functions into their own source file.

12 years agoMention how !foo is not the same as ALL,!foo
Todd C. Miller [Wed, 26 Sep 2012 18:55:18 +0000 (14:55 -0400)]
Mention how !foo is not the same as ALL,!foo

12 years agoStart commands in the background when I/O logging is enabled. We
Todd C. Miller [Tue, 25 Sep 2012 17:49:51 +0000 (13:49 -0400)]
Start commands in the background when I/O logging is enabled.  We
can't do this on Mac OS X due to a kernel bug in tc[gs]etattr(2)
which returns EINTR on signal instead of restarting automatically.

12 years agoHandle SIGCONT_FG and SIGCONT_BG when converting signal number to
Todd C. Miller [Tue, 25 Sep 2012 17:31:20 +0000 (13:31 -0400)]
Handle SIGCONT_FG and SIGCONT_BG when converting signal number to
string in deliver_signal().

12 years agoFix running commands that need the terminal in the background when
Todd C. Miller [Mon, 24 Sep 2012 19:06:14 +0000 (15:06 -0400)]
Fix running commands that need the terminal in the background when
I/O logging is enabled.  E.g. "sudo vi &".  When the command is
foregrounded, it will now resume properly.

12 years agoAdd rudimentary support for name-based matching as a compile-time
Todd C. Miller [Mon, 24 Sep 2012 14:09:41 +0000 (10:09 -0400)]
Add rudimentary support for name-based matching as a compile-time
option.  This unsafe when used in conjunction with the '!' operator.

12 years agoSplit out implementation-specific back end code out of pwutil.c
Todd C. Miller [Fri, 21 Sep 2012 20:25:01 +0000 (16:25 -0400)]
Split out implementation-specific back end code out of pwutil.c
into pwutil_impl.c.  This will allow the main pwutil code to be
used for lookup methods other than getpw* and getgr*.

12 years agosudo 1.8.6p3
Todd C. Miller [Tue, 18 Sep 2012 13:41:58 +0000 (09:41 -0400)]
sudo 1.8.6p3

12 years agoDon't use embedded newline when matching, use \n. This got expanded
Todd C. Miller [Tue, 18 Sep 2012 02:09:00 +0000 (22:09 -0400)]
Don't use embedded newline when matching, use \n.  This got expanded
at some point.  Bug #573

12 years agoRename yyerror() to sudoerserror() to match yacc prefix changes.
Todd C. Miller [Mon, 17 Sep 2012 21:03:17 +0000 (17:03 -0400)]
Rename yyerror() to sudoerserror() to match yacc prefix changes.
Not really needed due to the #defines that yacc makes but it is
less confusing this way as the lexer calls sudoerserror().

12 years agoNo need to translate "unable to allocate memory" when we can just
Todd C. Miller [Mon, 17 Sep 2012 20:59:26 +0000 (16:59 -0400)]
No need to translate "unable to allocate memory" when we can just
use the system translation via strerror().

12 years agoFall back on lstat(2) if d_type in struct dirent is DT_UNKNOWN.
Todd C. Miller [Mon, 17 Sep 2012 17:20:30 +0000 (13:20 -0400)]
Fall back on lstat(2) if d_type in struct dirent is DT_UNKNOWN.
Not all file systems support d_type.  Bug #572

12 years agoAvoid calling fclose(NULL) in the error path when we cannot open an
Todd C. Miller [Mon, 17 Sep 2012 14:53:46 +0000 (10:53 -0400)]
Avoid calling fclose(NULL) in the error path when we cannot open an
I/O log file.

12 years agoSudo 1.8.6p2
Todd C. Miller [Mon, 17 Sep 2012 01:04:33 +0000 (21:04 -0400)]
Sudo 1.8.6p2

12 years agoWhen setting the signal handler for SIGTSTP to the default value
Todd C. Miller [Sun, 16 Sep 2012 22:40:39 +0000 (18:40 -0400)]
When setting the signal handler for SIGTSTP to the default value
in non-I/O log mode, store the old handler value for when we restore
it after resume.

12 years agoReplace the guts of sudo_setenv_nodebug() with our old setenv.c
Todd C. Miller [Sun, 16 Sep 2012 19:18:58 +0000 (15:18 -0400)]
Replace the guts of sudo_setenv_nodebug() with our old setenv.c
which supports non-standard BSD and glibc semantics.
sudo_setenv() now simply calls sudo_setenv2().

12 years agoDocument non-Unix group support in LDAP sudoers.
Todd C. Miller [Sat, 15 Sep 2012 18:00:30 +0000 (14:00 -0400)]
Document non-Unix group support in LDAP sudoers.

12 years agoEnable non-Unix group support for LDAP sudoers. We now check for
Todd C. Miller [Sat, 15 Sep 2012 17:41:24 +0000 (13:41 -0400)]
Enable non-Unix group support for LDAP sudoers.  We now check for
non-Unix groups and netgroups with the same query in the second
pass.  Bug #571

12 years agoSet yacc prefix to "sudoers" to avoid conflicts other yacc parsers.
Todd C. Miller [Fri, 14 Sep 2012 20:19:25 +0000 (16:19 -0400)]
Set yacc prefix to "sudoers" to avoid conflicts other yacc parsers.

12 years agoMention support for SUCCESS=return in /etc/nsswitch.conf
Todd C. Miller [Wed, 12 Sep 2012 19:13:49 +0000 (15:13 -0400)]
Mention support for SUCCESS=return in /etc/nsswitch.conf

12 years agosudo 1.8.6p1
Todd C. Miller [Wed, 12 Sep 2012 18:37:27 +0000 (14:37 -0400)]
sudo 1.8.6p1

12 years agoAvoid setting LOGNAME, USER and USERNAME variables twice when
Todd C. Miller [Tue, 11 Sep 2012 14:24:20 +0000 (10:24 -0400)]
Avoid setting LOGNAME, USER and USERNAME variables twice when
set_logname is enabled.

12 years agoFix duplicate detection in sudo_putenv(), do not prune out the
Todd C. Miller [Tue, 11 Sep 2012 14:22:37 +0000 (10:22 -0400)]
Fix duplicate detection in sudo_putenv(), do not prune out the
variable we just set when overwriting an existing instance.
Fixes bug #570

12 years agoAdd some debuggging
Todd C. Miller [Tue, 11 Sep 2012 14:21:32 +0000 (10:21 -0400)]
Add some debuggging

12 years agoDisable word wrap in list mode when stdout is a pipe to make "sudo
Todd C. Miller [Tue, 4 Sep 2012 14:44:34 +0000 (10:44 -0400)]
Disable word wrap in list mode when stdout is a pipe to make "sudo
-l | grep ..." more useful.  Adapted from a diff by Daniel Kopecek.

12 years agoPrint a trailing newline in lbuf_print() when there is not enough
Todd C. Miller [Tue, 4 Sep 2012 14:42:09 +0000 (10:42 -0400)]
Print a trailing newline in lbuf_print() when there is not enough
space to do word wrapping and the lbuf does not end with a newline.

12 years agoAdd support for [SUCCESS=return] in nsswitch.conf; from Daniel Kopecek
Todd C. Miller [Tue, 4 Sep 2012 13:22:10 +0000 (09:22 -0400)]
Add support for [SUCCESS=return] in nsswitch.conf; from Daniel Kopecek

12 years agoAdd sssd.c
Todd C. Miller [Tue, 4 Sep 2012 13:07:33 +0000 (09:07 -0400)]
Add sssd.c

12 years agoregen .po files
Todd C. Miller [Sat, 1 Sep 2012 21:10:36 +0000 (17:10 -0400)]
regen .po files

12 years agoAdd Vietnamese sudoers translation from translationproject.org
Todd C. Miller [Sat, 1 Sep 2012 21:00:49 +0000 (17:00 -0400)]
Add Vietnamese sudoers translation from translationproject.org

12 years agomention PIE
Todd C. Miller [Sat, 1 Sep 2012 17:10:16 +0000 (13:10 -0400)]
mention PIE

12 years agoAdd Vietnamese sudoers translation from translationproject.org
Todd C. Miller [Sat, 1 Sep 2012 17:10:04 +0000 (13:10 -0400)]
Add Vietnamese sudoers translation from translationproject.org

12 years agoAdd missing signame dependency
Todd C. Miller [Wed, 29 Aug 2012 20:08:02 +0000 (16:08 -0400)]
Add missing signame dependency

12 years agoSilence compiler warnings.
Todd C. Miller [Wed, 29 Aug 2012 18:40:25 +0000 (14:40 -0400)]
Silence compiler warnings.

12 years agoReplace strsigname() with sig2str(), emulating it as needed.
Todd C. Miller [Wed, 29 Aug 2012 18:25:09 +0000 (14:25 -0400)]
Replace strsigname() with sig2str(), emulating it as needed.

12 years agoUse fseeko() for legacy utmp handling if available.
Todd C. Miller [Wed, 29 Aug 2012 14:32:49 +0000 (10:32 -0400)]
Use fseeko() for legacy utmp handling if available.

12 years agoDetect sys_sigabbrev[] and use it in place of sys_signame[] if
Todd C. Miller [Tue, 28 Aug 2012 14:11:38 +0000 (10:11 -0400)]
Detect sys_sigabbrev[] and use it in place of sys_signame[] if
present.  For some reason glibc does not declare sys_sigabbrev so
we must add an extern definition of our own.

12 years agoHandle NULL entries in sys_siglist and sys_signame.
Todd C. Miller [Tue, 28 Aug 2012 13:40:56 +0000 (09:40 -0400)]
Handle NULL entries in sys_siglist and sys_signame.

12 years agoConvert my_sys_sig{list,name} -> sudo_sys_sig{list,name}
Todd C. Miller [Tue, 28 Aug 2012 13:28:25 +0000 (09:28 -0400)]
Convert my_sys_sig{list,name} -> sudo_sys_sig{list,name}

12 years agosync
Todd C. Miller [Mon, 27 Aug 2012 15:28:38 +0000 (11:28 -0400)]
sync

12 years agoPass on SIGTSTP to the command if it was sent by a user process
Todd C. Miller [Mon, 27 Aug 2012 15:22:33 +0000 (11:22 -0400)]
Pass on SIGTSTP to the command if it was sent by a user process
(not the kernel or the terminal) when we are not I/O logging and
set the default SIGTSTP handler when we re-send the signal to
ourself, restoring our handler after we resume.

12 years agoShells typically change their process group when they start up so
Todd C. Miller [Mon, 27 Aug 2012 14:29:59 +0000 (10:29 -0400)]
Shells typically change their process group when they start up so
that they can implement job control.  Most well-behaved shells
change the pgrp back to its original value before suspending so we
must not try to restore in that case, lest we race with the child
upon resume, potentially stopping sudo with SIGTTOU while the command
continues to run.  Some shells, such as pdksh, just suspend the
shell by sending SIGSTOP to themselves without restoring the pgrp.
In this case we need to change the pgrp back for them.
Should fix bug #568

12 years agoUse strsigname() to print signal names in the debug output.
Todd C. Miller [Mon, 27 Aug 2012 00:12:51 +0000 (20:12 -0400)]
Use strsigname() to print signal names in the debug output.
If the system has no strsigname(), use our own.

12 years agoRemove generated file and change path for temporary include file.
Todd C. Miller [Thu, 23 Aug 2012 18:57:57 +0000 (14:57 -0400)]
Remove generated file and change path for temporary include file.

12 years agoWhen running regress tests, list pass/fail rate for each dir
Todd C. Miller [Thu, 23 Aug 2012 18:47:58 +0000 (14:47 -0400)]
When running regress tests, list pass/fail rate for each dir
(testsudoers and visudo) instead of the total.  Also prevent the
result files from clobbering each other by keeping them in the
relevant directories.

12 years agoDon't print an error message in yyerror() if open_sudoers() fails,
Todd C. Miller [Thu, 23 Aug 2012 18:02:02 +0000 (14:02 -0400)]
Don't print an error message in yyerror() if open_sudoers() fails,
we've already printed an error message.  Also restore the check
for sudoers_warnings in yyerror().

12 years agoAvoid printing the >>> parse error <<< message for testsudoers
Todd C. Miller [Thu, 23 Aug 2012 15:28:44 +0000 (11:28 -0400)]
Avoid printing the >>> parse error <<< message for testsudoers
when the -t flag is specified.

12 years agoFix NULL deref when an entry has no Runas_Entry
Todd C. Miller [Wed, 22 Aug 2012 19:50:58 +0000 (15:50 -0400)]
Fix NULL deref when an entry has no Runas_Entry

12 years agosync with translationproject.org
Todd C. Miller [Wed, 22 Aug 2012 16:56:28 +0000 (12:56 -0400)]
sync with translationproject.org

12 years agosync
Todd C. Miller [Wed, 22 Aug 2012 16:52:15 +0000 (12:52 -0400)]
sync

12 years agoCorrect the check_user() comment header.
Todd C. Miller [Wed, 22 Aug 2012 16:52:07 +0000 (12:52 -0400)]
Correct the check_user() comment header.

12 years agoChange a log_fatal() into log_error() when no auth methods are
Todd C. Miller [Wed, 22 Aug 2012 16:51:46 +0000 (12:51 -0400)]
Change a log_fatal() into log_error() when no auth methods are
configured.  The caller already checks the return value.

12 years agoAdd missing debug_return
Todd C. Miller [Wed, 22 Aug 2012 14:20:27 +0000 (10:20 -0400)]
Add missing debug_return

12 years agoMake the capitalization consistent for .Ss and .Sx
Todd C. Miller [Tue, 21 Aug 2012 19:11:43 +0000 (15:11 -0400)]
Make the capitalization consistent for .Ss and .Sx

12 years agoAdd COMMAND EXECUTION section that describes how sudo runs
Todd C. Miller [Tue, 21 Aug 2012 17:01:43 +0000 (13:01 -0400)]
Add COMMAND EXECUTION section that describes how sudo runs
the command, the extra sudo processes and signal handling.

12 years agoHappy Easter
Todd C. Miller [Sat, 18 Aug 2012 23:58:07 +0000 (19:58 -0400)]
Happy Easter

12 years agoDon't echo the awk command when building siglist.in
Todd C. Miller [Fri, 17 Aug 2012 19:58:45 +0000 (15:58 -0400)]
Don't echo the awk command when building siglist.in

12 years agoCosmetic changes.
Todd C. Miller [Fri, 17 Aug 2012 19:58:06 +0000 (15:58 -0400)]
Cosmetic changes.

12 years agoThe HISTORY, LICENSE and CONTRIBUTORS files are not longer generated.
Todd C. Miller [Fri, 17 Aug 2012 19:57:32 +0000 (15:57 -0400)]
The HISTORY, LICENSE and CONTRIBUTORS files are not longer generated.

12 years agoSync with translationproject.org and add Italian sudoers translation.
Todd C. Miller [Fri, 17 Aug 2012 13:56:44 +0000 (09:56 -0400)]
Sync with translationproject.org and add Italian sudoers translation.

12 years agoExpand description of fqdn to talk about systems where the hosts
Todd C. Miller [Thu, 16 Aug 2012 14:11:04 +0000 (10:11 -0400)]
Expand description of fqdn to talk about systems where the hosts
file is searched before DNS.

12 years agoFor cat pages there is nothing to make unless DEVEL is set.
Todd C. Miller [Wed, 15 Aug 2012 19:10:50 +0000 (15:10 -0400)]
For cat pages there is nothing to make unless DEVEL is set.

12 years agoAlways use mandoc to format cat pages and remove now-extraneous
Todd C. Miller [Wed, 15 Aug 2012 14:32:25 +0000 (10:32 -0400)]
Always use mandoc to format cat pages and remove now-extraneous
nroff configure tests.

12 years agosync polypkg from git
Todd C. Miller [Wed, 15 Aug 2012 14:00:27 +0000 (10:00 -0400)]
sync polypkg from git

12 years agoUse AI_FQDN instead of AI_CANONNAME if available since "canonical"
Todd C. Miller [Wed, 15 Aug 2012 13:52:26 +0000 (09:52 -0400)]
Use AI_FQDN instead of AI_CANONNAME if available since "canonical"
is not always the same as "fully qualified".

12 years agoFix some typos.
Todd C. Miller [Tue, 14 Aug 2012 18:16:49 +0000 (14:16 -0400)]
Fix some typos.
Describe error messages not related to policy permissions.

12 years agoAdd new check_defaults() function to check (but not update) the
Todd C. Miller [Tue, 14 Aug 2012 14:45:55 +0000 (10:45 -0400)]
Add new check_defaults() function to check (but not update) the
Defaults entries.  Visudo can now use this instead of update_defaults
to check all the defaults regardless instead of just the global
Defaults entries.

12 years agoDocument sudoers log format.
Todd C. Miller [Mon, 13 Aug 2012 20:50:31 +0000 (16:50 -0400)]
Document sudoers log format.

12 years agoUpdate for sudo 1.8.5p3
Todd C. Miller [Mon, 13 Aug 2012 19:05:00 +0000 (15:05 -0400)]
Update for sudo 1.8.5p3

12 years agoAdd missing check for I/O plugin API version when checking for the
Todd C. Miller [Mon, 13 Aug 2012 18:44:54 +0000 (14:44 -0400)]
Add missing check for I/O plugin API version when checking for the
presence of I/O plugin hooks.

12 years agoCan't call debug code in the process_hooks_xxx functions() since
Todd C. Miller [Mon, 13 Aug 2012 18:39:40 +0000 (14:39 -0400)]
Can't call debug code in the process_hooks_xxx functions() since
ctime() may look up the timezone via the TZ environment variable.

12 years agoInclude signal.h before sudo_exec.h since it uses sigset_t * in the
Todd C. Miller [Fri, 10 Aug 2012 19:29:07 +0000 (15:29 -0400)]
Include signal.h before sudo_exec.h since it uses sigset_t * in the
fork_pty prototype.

12 years agoRemove OPTIONS section; options now go inside DESCRIPTION
Todd C. Miller [Fri, 10 Aug 2012 19:23:41 +0000 (15:23 -0400)]
Remove OPTIONS section; options now go inside DESCRIPTION

12 years agoregen
Todd C. Miller [Fri, 10 Aug 2012 17:18:19 +0000 (13:18 -0400)]
regen

12 years agoSync with translationproject.org and add new Slovenian translation.
Todd C. Miller [Fri, 10 Aug 2012 17:07:53 +0000 (13:07 -0400)]
Sync with translationproject.org and add new Slovenian translation.

12 years agoReduce the number of "internal error, foo overflow" messages that
Todd C. Miller [Fri, 10 Aug 2012 16:18:38 +0000 (12:18 -0400)]
Reduce the number of "internal error, foo overflow" messages that
need to be translated.

12 years agoMention HP-UX reboot fix.
Todd C. Miller [Fri, 10 Aug 2012 16:07:52 +0000 (12:07 -0400)]
Mention HP-UX reboot fix.

12 years agoSupport for using SSSD (http://fedorahosted.org/sssd/) as a sudoers
Todd C. Miller [Fri, 10 Aug 2012 15:59:26 +0000 (11:59 -0400)]
Support for using SSSD (http://fedorahosted.org/sssd/) as a sudoers
data source.  From Daniel Kopecek and Pavel Brezina.

12 years agoIf sudo.conf contains an I/O plugin but no policy plugin, use sudoers
Todd C. Miller [Thu, 9 Aug 2012 18:11:41 +0000 (14:11 -0400)]
If sudo.conf contains an I/O plugin but no policy plugin, use sudoers
for the policy plugin.  If a policy plugin is specified without an
I/O plugin, only the policy plugin will be loaded.

12 years agoDo not modify the .Os section when building the .man.in file from
Todd C. Miller [Thu, 9 Aug 2012 15:47:01 +0000 (11:47 -0400)]
Do not modify the .Os section when building the .man.in file from
.mdoc.in.

12 years agoAdd a note about wildcards matching multiple words and include an
Todd C. Miller [Thu, 9 Aug 2012 15:36:25 +0000 (11:36 -0400)]
Add a note about wildcards matching multiple words and include an
example.  Also mention that for sudoedit, a wildcard in command
line args does not match a slash.

12 years agoFix a comment, update a variable name in a prototype; all cosmetic.
Todd C. Miller [Tue, 7 Aug 2012 18:47:58 +0000 (14:47 -0400)]
Fix a comment, update a variable name in a prototype; all cosmetic.

12 years agoCast 2nd argument of lseek() to off_t if it is a constant for systems
Todd C. Miller [Tue, 7 Aug 2012 18:42:08 +0000 (14:42 -0400)]
Cast 2nd argument of lseek() to off_t if it is a constant for systems
with 64-bit off_t but without a proper lseek() prototype.

12 years agoFix some warnings from clang checker-267
Todd C. Miller [Tue, 7 Aug 2012 15:01:28 +0000 (11:01 -0400)]
Fix some warnings from clang checker-267

12 years agoFix memory leak found by clang checker-267
Todd C. Miller [Tue, 7 Aug 2012 14:27:55 +0000 (10:27 -0400)]
Fix memory leak found by clang checker-267

12 years agoIf we receive a signal from the command we executed, do not forward
Todd C. Miller [Mon, 6 Aug 2012 18:38:35 +0000 (14:38 -0400)]
If we receive a signal from the command we executed, do not forward
it back to the command.  This fixes a problem with BSD-derived
versions of the reboot command which send SIGTERM to all other
processes, including the sudo process.  Sudo would then deliver
SIGTERM to reboot which would die before calling the reboot() system
call, effectively leaving the system in single user mode.

12 years agoRemove section about Solaris 10 on other systems.
Todd C. Miller [Fri, 3 Aug 2012 13:27:39 +0000 (09:27 -0400)]
Remove section about Solaris 10 on other systems.
Add missing sudoers.man.in bit to fixman.sh.

12 years agoExpand section on Solaris privileges.
Todd C. Miller [Fri, 3 Aug 2012 01:11:25 +0000 (21:11 -0400)]
Expand section on Solaris privileges.

12 years agoExpand a bit on the Solaris priv set changes.
Todd C. Miller [Thu, 2 Aug 2012 20:48:35 +0000 (16:48 -0400)]
Expand a bit on the Solaris priv set changes.

12 years agoThe second argument to init_parser() is now bool.
Todd C. Miller [Thu, 2 Aug 2012 19:40:11 +0000 (15:40 -0400)]
The second argument to init_parser() is now bool.

12 years agoFix printing of parse error message to stderr.
Todd C. Miller [Thu, 2 Aug 2012 19:37:48 +0000 (15:37 -0400)]
Fix printing of parse error message to stderr.

12 years agoIf a command matches using an empty Runas_List (i.e. Runas_List is
Todd C. Miller [Thu, 2 Aug 2012 18:37:32 +0000 (14:37 -0400)]
If a command matches using an empty Runas_List (i.e. Runas_List is
present but empty) and the -u option was not specified, set runas_pw
to user_pw instead of using runas_default.  This is intended to be
used in conjunction with the Solaris Privilege Set support for rules
that grant privileges without changing the user.

12 years agoAdd support for parsing an empty Runas_List, which only allows the
Todd C. Miller [Thu, 2 Aug 2012 18:02:54 +0000 (14:02 -0400)]
Add support for parsing an empty Runas_List, which only allows the
command to be run as the invoking user.  This can be used in
conjunction with the Solaris Privilege Set support to grant privileges
without changing the user.

12 years agoFix HP-UX, just use ".TH name section" like the vendor manuals.
Todd C. Miller [Wed, 1 Aug 2012 19:28:02 +0000 (15:28 -0400)]
Fix HP-UX, just use ".TH name section" like the vendor manuals.

12 years agoFix compilation on Solaris
Todd C. Miller [Wed, 1 Aug 2012 18:57:14 +0000 (14:57 -0400)]
Fix compilation on Solaris

12 years agoGenerate a sed script file when munging *.mdoc or *.man instead of
Todd C. Miller [Wed, 1 Aug 2012 18:38:52 +0000 (14:38 -0400)]
Generate a sed script file when munging *.mdoc or *.man instead of
passing sed expressions on the command line.  Older seds do not
support \n in a replacement so generate and run a sed script instead.

12 years agoUse "Sudo VERSION" as the 4th arg to .TH instead of just "VERSION"
Todd C. Miller [Wed, 1 Aug 2012 14:54:09 +0000 (10:54 -0400)]
Use "Sudo VERSION" as the 4th arg to .TH instead of just "VERSION"

12 years agoWhen checking whether a signal is user-generated, compare si_code
Todd C. Miller [Tue, 31 Jul 2012 17:36:48 +0000 (13:36 -0400)]
When checking whether a signal is user-generated, compare si_code
against SI_USER instead of <= 0 since on HP-UX, terminal-related
signals get a code of 0.

12 years agoSuSE Enterprise Linux uses RLIMIT_NPROC and _SC_CHILD_MAX interchangably.
Todd C. Miller [Tue, 31 Jul 2012 15:11:25 +0000 (11:11 -0400)]
SuSE Enterprise Linux uses RLIMIT_NPROC and _SC_CHILD_MAX interchangably.
This causes problems when setting RLIMIT_NPROC to RLIM_INFINITY due
to a bug in bash where bash tries to honor the value of _SC_CHILD_MAX
but treats a value of -1 as an error, and uses a default value of
32 instead.

Previously, we just checked RLIMIT_NPROC and, if it was unlimited,
restored the previous value of RLIMIT_NPROC.  However, that makes
it impossible to set nproc to unlimited.  We now only restore the
nproc resource limit if sysconf(_SC_CHILD_MAX) is negative.  In
most cases, pam_limits will set RLIMIT_NPROC for us.