]> granicus.if.org Git - sudo/log
sudo
13 years agoSet real uid to root before calling sudo_edit() or run_command()
Todd C. Miller [Mon, 6 Feb 2012 18:37:26 +0000 (13:37 -0500)]
Set real uid to root before calling sudo_edit() or run_command()
so that the monitor process is owned by root and not by the user.
Otherwise, on AIX at least, the monitor process shows up in ps as
belonging to the user (and can be killed by the user).

--HG--
branch : 1.8

13 years agoFor PERM_ROOT when using setreuid(), only set the euid to 0 prior
Todd C. Miller [Mon, 6 Feb 2012 18:37:11 +0000 (13:37 -0500)]
For PERM_ROOT when using setreuid(), only set the euid to 0 prior
to the call to setuid(0) if the current euid is non-zero.  This
effectively restores the state of things prior to rev 7bfeb629fccb.
Fixes a problem on AIX where LDR_PRELOAD was not being honored for
the command being executed.

--HG--
branch : 1.8

13 years agoMake a copy of the struct passwd in exec_setup() to make sure nothing
Todd C. Miller [Mon, 6 Feb 2012 18:36:57 +0000 (13:36 -0500)]
Make a copy of the struct passwd in exec_setup() to make sure nothing
in the policy init modifies it.

--HG--
branch : 1.8

13 years agoSet real uid to root before calling sudo_edit() or run_command()
Todd C. Miller [Mon, 6 Feb 2012 18:33:46 +0000 (13:33 -0500)]
Set real uid to root before calling sudo_edit() or run_command()
so that the monitor process is owned by root and not by the user.
Otherwise, on AIX at least, the monitor process shows up in ps as
belonging to the user (and can be killed by the user).

13 years agoFor PERM_ROOT when using setreuid(), only set the euid to 0 prior
Todd C. Miller [Mon, 6 Feb 2012 18:29:19 +0000 (13:29 -0500)]
For PERM_ROOT when using setreuid(), only set the euid to 0 prior
to the call to setuid(0) if the current euid is non-zero.  This
effectively restores the state of things prior to rev 7bfeb629fccb.
Fixes a problem on AIX where LDR_PRELOAD was not being honored for
the command being executed.

13 years agoMake a copy of the struct passwd in exec_setup() to make sure nothing
Todd C. Miller [Mon, 6 Feb 2012 15:56:39 +0000 (10:56 -0500)]
Make a copy of the struct passwd in exec_setup() to make sure nothing
in the policy init modifies it.

13 years agoregen
Todd C. Miller [Sun, 5 Feb 2012 18:36:52 +0000 (13:36 -0500)]
regen

--HG--
branch : 1.8

13 years agoupdate copyright
Todd C. Miller [Sun, 5 Feb 2012 18:36:06 +0000 (13:36 -0500)]
update copyright

--HG--
branch : 1.8

13 years agoupdate copyright
Todd C. Miller [Sun, 5 Feb 2012 18:35:20 +0000 (13:35 -0500)]
update copyright

13 years agog/c now-unused debug subsystems
Todd C. Miller [Sun, 5 Feb 2012 15:18:55 +0000 (10:18 -0500)]
g/c now-unused debug subsystems

--HG--
branch : 1.8

13 years agoEnumerate the debug subsystems used by sudo and sudoers.
Todd C. Miller [Sun, 5 Feb 2012 15:18:46 +0000 (10:18 -0500)]
Enumerate the debug subsystems used by sudo and sudoers.

--HG--
branch : 1.8

13 years agog/c now-unused debug subsystems
Todd C. Miller [Sun, 5 Feb 2012 15:17:26 +0000 (10:17 -0500)]
g/c now-unused debug subsystems

13 years agoEnumerate the debug subsystems used by sudo and sudoers.
Todd C. Miller [Sun, 5 Feb 2012 15:17:09 +0000 (10:17 -0500)]
Enumerate the debug subsystems used by sudo and sudoers.

13 years agoNormally, sudo disables core dumps while it is running. This
Todd C. Miller [Fri, 3 Feb 2012 19:59:36 +0000 (14:59 -0500)]
Normally, sudo disables core dumps while it is running.  This
behavior can now be modified at run time with a line in sudo.conf
like "Set disable_coredumps false"

--HG--
branch : 1.8

13 years agoNormally, sudo disables core dumps while it is running. This
Todd C. Miller [Fri, 3 Feb 2012 19:57:03 +0000 (14:57 -0500)]
Normally, sudo disables core dumps while it is running.  This
behavior can now be modified at run time with a line in sudo.conf
like "Set disable_coredumps false"

13 years agoMention Spanish translation
Todd C. Miller [Fri, 3 Feb 2012 17:31:42 +0000 (12:31 -0500)]
Mention Spanish translation

--HG--
branch : 1.8

13 years agoMention Spanish translation
Todd C. Miller [Fri, 3 Feb 2012 17:31:24 +0000 (12:31 -0500)]
Mention Spanish translation

13 years agoMake sure we don't try to fall back to using the conversation
Todd C. Miller [Fri, 3 Feb 2012 17:30:36 +0000 (12:30 -0500)]
Make sure we don't try to fall back to using the conversation
function for debugging in the main sudo process if we are unable
to open the debug file.

--HG--
branch : 1.8

13 years agoMake sure we don't try to fall back to using the conversation
Todd C. Miller [Fri, 3 Feb 2012 17:30:07 +0000 (12:30 -0500)]
Make sure we don't try to fall back to using the conversation
function for debugging in the main sudo process if we are unable
to open the debug file.

13 years agoAdd sudo Spanish translation from translationproject.org
Todd C. Miller [Fri, 3 Feb 2012 14:16:34 +0000 (09:16 -0500)]
Add sudo Spanish translation from translationproject.org

--HG--
branch : 1.8

13 years agoBetter debug subsystem usage
Todd C. Miller [Fri, 3 Feb 2012 14:16:24 +0000 (09:16 -0500)]
Better debug subsystem usage

--HG--
branch : 1.8

13 years agoRemove duplicate function prototypes
Todd C. Miller [Fri, 3 Feb 2012 14:16:14 +0000 (09:16 -0500)]
Remove duplicate function prototypes

--HG--
branch : 1.8

13 years agoAdd sudo Spanish translation from translationproject.org
Todd C. Miller [Fri, 3 Feb 2012 14:15:14 +0000 (09:15 -0500)]
Add sudo Spanish translation from translationproject.org

13 years agoBetter debug subsystem usage
Todd C. Miller [Thu, 2 Feb 2012 16:28:33 +0000 (11:28 -0500)]
Better debug subsystem usage

13 years agoRemove duplicate function prototypes
Todd C. Miller [Thu, 2 Feb 2012 16:28:19 +0000 (11:28 -0500)]
Remove duplicate function prototypes

13 years agoError out if user specified --with-pam but we can't find the headers
Todd C. Miller [Wed, 1 Feb 2012 16:28:21 +0000 (11:28 -0500)]
Error out if user specified --with-pam but we can't find the headers
or library.  Also throw an error if the headers are present but the
library is not and vice versa.

--HG--
branch : 1.8

13 years agoError out if user specified --with-pam but we can't find the headers
Todd C. Miller [Wed, 1 Feb 2012 16:27:50 +0000 (11:27 -0500)]
Error out if user specified --with-pam but we can't find the headers
or library.  Also throw an error if the headers are present but the
library is not and vice versa.

13 years agoFix the sudoers permission check when the expected sudoers mode is
Todd C. Miller [Tue, 31 Jan 2012 21:28:20 +0000 (16:28 -0500)]
Fix the sudoers permission check when the expected sudoers mode is
owner-writable.

--HG--
branch : 1.8

13 years agoFix the sudoers permission check when the expected sudoers mode is
Todd C. Miller [Tue, 31 Jan 2012 21:24:57 +0000 (16:24 -0500)]
Fix the sudoers permission check when the expected sudoers mode is
owner-writable.

13 years agoVerify that we can link executables built with -D_FORTIFY_SOURCE
Todd C. Miller [Mon, 30 Jan 2012 19:10:37 +0000 (14:10 -0500)]
Verify that we can link executables built with -D_FORTIFY_SOURCE
before using it.

--HG--
branch : 1.8

13 years agoVerify that we can link executables built with -D_FORTIFY_SOURCE
Todd C. Miller [Mon, 30 Jan 2012 19:09:17 +0000 (14:09 -0500)]
Verify that we can link executables built with -D_FORTIFY_SOURCE
before using it.

13 years agoFix potential off-by-one when making a copy of the environment for
Todd C. Miller [Mon, 30 Jan 2012 18:49:55 +0000 (13:49 -0500)]
Fix potential off-by-one when making a copy of the environment for
LD_PRELOAD insertion.  Fixes bug #534

--HG--
branch : 1.8

13 years agoFix potential off-by-one when making a copy of the environment for
Todd C. Miller [Mon, 30 Jan 2012 18:49:24 +0000 (13:49 -0500)]
Fix potential off-by-one when making a copy of the environment for
LD_PRELOAD insertion.  Fixes bug #534

13 years agoAdd rudimentary check for _FORTIFY_SOURCE support by checking for
Todd C. Miller [Mon, 30 Jan 2012 15:10:14 +0000 (10:10 -0500)]
Add rudimentary check for _FORTIFY_SOURCE support by checking for
__sprintf_chk, one of the functions used by gcc to support it.

--HG--
branch : 1.8

13 years agoUse AC_HEADER_STDBOOL instead of checking for stdbool.h ourselves.
Todd C. Miller [Mon, 30 Jan 2012 15:10:01 +0000 (10:10 -0500)]
Use AC_HEADER_STDBOOL instead of checking for stdbool.h ourselves.

--HG--
branch : 1.8

13 years agoAdd rudimentary check for _FORTIFY_SOURCE support by checking for
Todd C. Miller [Mon, 30 Jan 2012 15:09:23 +0000 (10:09 -0500)]
Add rudimentary check for _FORTIFY_SOURCE support by checking for
__sprintf_chk, one of the functions used by gcc to support it.

13 years agoUse AC_HEADER_STDBOOL instead of checking for stdbool.h ourselves.
Todd C. Miller [Mon, 30 Jan 2012 14:28:11 +0000 (09:28 -0500)]
Use AC_HEADER_STDBOOL instead of checking for stdbool.h ourselves.

13 years agoregen
Todd C. Miller [Sun, 29 Jan 2012 19:50:45 +0000 (14:50 -0500)]
regen

--HG--
branch : 1.8

13 years agoregen
Todd C. Miller [Sun, 29 Jan 2012 19:48:20 +0000 (14:48 -0500)]
regen

13 years agoThe change in 4fe0f357d34b that caused to exit when the monitor
Todd C. Miller [Wed, 25 Jan 2012 21:29:56 +0000 (16:29 -0500)]
The change in 4fe0f357d34b that caused to exit when the monitor
dies created a race condition between the monitor exiting and the
status being read.  All we really want to do is make sure that
select() notifies us that there is a status change when the monitor
dies unexpectedly so shutdown the socketpair connected to the monitor
for writing when it dies.  That way we can still read the status
that is pending on the socket and select() on Linux will tell us
that the fd is ready.

--HG--
branch : 1.8

13 years agoThe change in 818e82ecbbfc that caused to exit when the monitor
Todd C. Miller [Wed, 25 Jan 2012 21:29:08 +0000 (16:29 -0500)]
The change in 818e82ecbbfc that caused to exit when the monitor
dies created a race condition between the monitor exiting and the
status being read.  All we really want to do is make sure that
select() notifies us that there is a status change when the monitor
dies unexpectedly so shutdown the socketpair connected to the monitor
for writing when it dies.  That way we can still read the status
that is pending on the socket and select() on Linux will tell us
that the fd is ready.

13 years agoRefactor disable_execute() and my_execve() into exec_common.c for
Todd C. Miller [Wed, 25 Jan 2012 19:58:36 +0000 (14:58 -0500)]
Refactor disable_execute() and my_execve() into exec_common.c for
use by sesh.c.  This fixes NOEXEC when SELinux is used.  Instead
of disabling exec in exec_setup(), disable it immediately before
executing the command.  Adapted from a diff by Arno Schuring.

--HG--
branch : 1.8

13 years agoRefactor disable_execute() and my_execve() into exec_common.c for
Todd C. Miller [Wed, 25 Jan 2012 19:58:02 +0000 (14:58 -0500)]
Refactor disable_execute() and my_execve() into exec_common.c for
use by sesh.c.  This fixes NOEXEC when SELinux is used.  Instead
of disabling exec in exec_setup(), disable it immediately before
executing the command.  Adapted from a diff by Arno Schuring.

13 years agoAdd custom version of AC_CHECK_LIB that uses the extra libs in the
Todd C. Miller [Fri, 20 Jan 2012 15:29:22 +0000 (10:29 -0500)]
Add custom version of AC_CHECK_LIB that uses the extra libs in the
cache value name.  With this we no longer need to rely on a modified
version of autoconf.

--HG--
branch : 1.8

13 years agoAdd custom version of AC_CHECK_LIB that uses the extra libs in the
Todd C. Miller [Fri, 20 Jan 2012 15:28:56 +0000 (10:28 -0500)]
Add custom version of AC_CHECK_LIB that uses the extra libs in the
cache value name.  With this we no longer need to rely on a modified
version of autoconf.

13 years agoBetter handling of network functions that need -lsocket -lnsl
Todd C. Miller [Thu, 19 Jan 2012 19:19:58 +0000 (14:19 -0500)]
Better handling of network functions that need -lsocket -lnsl

--HG--
branch : 1.8

13 years agoBetter handling of network functions that need -lsocket -lnsl
Todd C. Miller [Thu, 19 Jan 2012 19:19:37 +0000 (14:19 -0500)]
Better handling of network functions that need -lsocket -lnsl

13 years agoWhen setting up the execution environment, set groups before gid/egid
Todd C. Miller [Thu, 19 Jan 2012 17:56:43 +0000 (12:56 -0500)]
When setting up the execution environment, set groups before gid/egid
like sudo 1.7 did.

--HG--
branch : 1.8

13 years agoRemove "WARNING: unable to find foo() trying -lsocket -lnsl"
Todd C. Miller [Thu, 19 Jan 2012 17:56:31 +0000 (12:56 -0500)]
Remove "WARNING: unable to find foo() trying -lsocket -lnsl"

--HG--
branch : 1.8

13 years agoWhen setting up the execution environment, set groups before gid/egid
Todd C. Miller [Thu, 19 Jan 2012 17:55:23 +0000 (12:55 -0500)]
When setting up the execution environment, set groups before gid/egid
like sudo 1.7 did.

13 years agoRemove "WARNING: unable to find foo() trying -lsocket -lnsl"
Todd C. Miller [Thu, 19 Jan 2012 16:09:22 +0000 (11:09 -0500)]
Remove "WARNING: unable to find foo() trying -lsocket -lnsl"

13 years agoFor "sudo -g" prepend the specified group ID to the beginning of
Todd C. Miller [Thu, 19 Jan 2012 16:08:45 +0000 (11:08 -0500)]
For "sudo -g" prepend the specified group ID to the beginning of
the groups list.  This matches BSD convention where the effective
gid is the first entry in the group list.  This is required on newer
FreeBSD where the effective gid is not tracked separately and thus
setgroups() changes the egid if this convention is not followed.
Fixes bug #532

--HG--
branch : 1.8

13 years agoFor "sudo -g" prepend the specified group ID to the beginning of
Todd C. Miller [Thu, 19 Jan 2012 16:03:22 +0000 (11:03 -0500)]
For "sudo -g" prepend the specified group ID to the beginning of
the groups list.  This matches BSD convention where the effective
gid is the first entry in the group list.  This is required on newer
FreeBSD where the effective gid is not tracked separately and thus
setgroups() changes the egid if this convention is not followed.
Fixes bug #532

13 years agoFix sh warning; use "test" instead of "["
Todd C. Miller [Tue, 17 Jan 2012 18:08:41 +0000 (13:08 -0500)]
Fix sh warning; use "test" instead of "["

--HG--
branch : 1.8

13 years agoFix sh warning; use "test" instead of "["
Todd C. Miller [Tue, 17 Jan 2012 18:07:35 +0000 (13:07 -0500)]
Fix sh warning; use "test" instead of "["

13 years agoWhen not logging I/O, use a signal handler that only forwards SIGINT,
Todd C. Miller [Tue, 17 Jan 2012 15:28:42 +0000 (10:28 -0500)]
When not logging I/O, use a signal handler that only forwards SIGINT,
SIGQUIT and SIGHUP when they are user-generated signals.  Fixes a
race in the non-I/O logging path where the command may receive two
keyboard-generated signals; one from the kernel and one from the
sudo process.

--HG--
branch : 1.8

13 years agoBack out change that put the command in its own pgrp when not logging
Todd C. Miller [Tue, 17 Jan 2012 15:28:33 +0000 (10:28 -0500)]
Back out change that put the command in its own pgrp when not logging
I/O.  It causes problems with pipelines.

--HG--
branch : 1.8

13 years agoOnly run compat regress tests on compat objects we actually build.
Todd C. Miller [Tue, 17 Jan 2012 15:28:21 +0000 (10:28 -0500)]
Only run compat regress tests on compat objects we actually build.
Fixes "make check" in the compat dir for systems that don't implement
character classes in fnmatch() or glob().  Bug #531

--HG--
branch : 1.8

13 years agoWhen not logging I/O, use a signal handler that only forwards SIGINT,
Todd C. Miller [Tue, 17 Jan 2012 15:27:33 +0000 (10:27 -0500)]
When not logging I/O, use a signal handler that only forwards SIGINT,
SIGQUIT and SIGHUP when they are user-generated signals.  Fixes a
race in the non-I/O logging path where the command may receive two
keyboard-generated signals; one from the kernel and one from the
sudo process.

13 years agoBack out change that put the command in its own pgrp when not logging
Todd C. Miller [Tue, 17 Jan 2012 15:25:44 +0000 (10:25 -0500)]
Back out change that put the command in its own pgrp when not logging
I/O.  It causes problems with pipelines.

13 years agoOnly run compat regress tests on compat objects we actually build.
Todd C. Miller [Mon, 16 Jan 2012 15:40:11 +0000 (10:40 -0500)]
Only run compat regress tests on compat objects we actually build.
Fixes "make check" in the compat dir for systems that don't implement
character classes in fnmatch() or glob().  Bug #531

13 years agoUpdate po files from translationproject.org
Todd C. Miller [Sat, 14 Jan 2012 13:31:31 +0000 (08:31 -0500)]
Update po files from translationproject.org

--HG--
branch : 1.8

13 years agoUpdate po files from translationproject.org
Todd C. Miller [Sat, 14 Jan 2012 12:19:43 +0000 (07:19 -0500)]
Update po files from translationproject.org

13 years agoInclude parent directories in case they don't already exist. This
Todd C. Miller [Fri, 13 Jan 2012 14:49:48 +0000 (09:49 -0500)]
Include parent directories in case they don't already exist.  This
fixes a directory permissions problem with the AIX package when the
/usr/local directories don't already exist.

--HG--
branch : 1.8

13 years agoInclude parent directories in case they don't already exist. This
Todd C. Miller [Fri, 13 Jan 2012 14:49:20 +0000 (09:49 -0500)]
Include parent directories in case they don't already exist.  This
fixes a directory permissions problem with the AIX package when the
/usr/local directories don't already exist.

13 years agosync with git version
Todd C. Miller [Fri, 13 Jan 2012 14:07:46 +0000 (09:07 -0500)]
sync with git version

--HG--
branch : 1.8

13 years agoregen dependencies
Todd C. Miller [Fri, 13 Jan 2012 14:07:31 +0000 (09:07 -0500)]
regen dependencies

--HG--
branch : 1.8

13 years agoMove tty name lookup code to its own file.
Todd C. Miller [Fri, 13 Jan 2012 14:07:18 +0000 (09:07 -0500)]
Move tty name lookup code to its own file.

--HG--
branch : 1.8

13 years agosync with git version
Todd C. Miller [Fri, 13 Jan 2012 14:06:08 +0000 (09:06 -0500)]
sync with git version

13 years agoregen dependencies
Todd C. Miller [Fri, 13 Jan 2012 11:02:17 +0000 (06:02 -0500)]
regen dependencies

13 years agoMove tty name lookup code to its own file.
Todd C. Miller [Fri, 13 Jan 2012 11:01:58 +0000 (06:01 -0500)]
Move tty name lookup code to its own file.

13 years agoUpdate with latest sudo 1.8.4 changes.
Todd C. Miller [Thu, 12 Jan 2012 21:44:42 +0000 (16:44 -0500)]
Update with latest sudo 1.8.4 changes.

--HG--
branch : 1.8

13 years agoRemove obsolete template for HAVE_TIMESPEC
Todd C. Miller [Thu, 12 Jan 2012 21:44:21 +0000 (16:44 -0500)]
Remove obsolete template for HAVE_TIMESPEC

--HG--
branch : 1.8

13 years agoAdd a check for devname() returning a fully-qualified pathname.
Todd C. Miller [Thu, 12 Jan 2012 21:44:07 +0000 (16:44 -0500)]
Add a check for devname() returning a fully-qualified pathname.
None of the devname() implementations do this today but you never
know when this might change.

--HG--
branch : 1.8

13 years agoUpdate with latest sudo 1.8.4 changes.
Todd C. Miller [Thu, 12 Jan 2012 21:42:28 +0000 (16:42 -0500)]
Update with latest sudo 1.8.4 changes.

13 years agoRemove obsolete template for HAVE_TIMESPEC
Todd C. Miller [Thu, 12 Jan 2012 18:25:04 +0000 (13:25 -0500)]
Remove obsolete template for HAVE_TIMESPEC

13 years agoAdd a check for devname() returning a fully-qualified pathname.
Todd C. Miller [Thu, 12 Jan 2012 12:50:40 +0000 (07:50 -0500)]
Add a check for devname() returning a fully-qualified pathname.
None of the devname() implementations do this today but you never
know when this might change.

13 years agoFor "visudo -c" also list include files that were checked when
Todd C. Miller [Wed, 11 Jan 2012 21:26:58 +0000 (16:26 -0500)]
For "visudo -c" also list include files that were checked when
everything is OK.

--HG--
branch : 1.8

13 years agoFor "visudo -c" also list include files that were checked when
Todd C. Miller [Wed, 11 Jan 2012 21:25:39 +0000 (16:25 -0500)]
For "visudo -c" also list include files that were checked when
everything is OK.

13 years agoThe device name returned by devname() does not include the /dev/
Todd C. Miller [Wed, 11 Jan 2012 20:40:42 +0000 (15:40 -0500)]
The device name returned by devname() does not include the /dev/
prefix so we need to add it ourselves.  Also add debug warning if
KERN_PROC sysctl fails or devname() can't resolve the tty device
to a name.

--HG--
branch : 1.8

13 years agoThe result of writev() is never checked so just cast to NULL.
Todd C. Miller [Wed, 11 Jan 2012 20:39:23 +0000 (15:39 -0500)]
The result of writev() is never checked so just cast to NULL.

--HG--
branch : 1.8

13 years agoThe device name returned by devname() does not include the /dev/
Todd C. Miller [Wed, 11 Jan 2012 20:38:18 +0000 (15:38 -0500)]
The device name returned by devname() does not include the /dev/
prefix so we need to add it ourselves.

13 years agoAdd debug warning if KERN_PROC sysctl fails or devname() can't
Todd C. Miller [Wed, 11 Jan 2012 19:09:16 +0000 (14:09 -0500)]
Add debug warning if KERN_PROC sysctl fails or devname() can't
resolve the tty device to a name.

13 years agoThe result of writev() is never checked so just cast to NULL.
Todd C. Miller [Wed, 11 Jan 2012 18:09:09 +0000 (13:09 -0500)]
The result of writev() is never checked so just cast to NULL.

13 years agoUpdate Esperanto, Finnish, Polish and Ukrainian translations from
Todd C. Miller [Wed, 11 Jan 2012 12:10:08 +0000 (07:10 -0500)]
Update Esperanto, Finnish, Polish and Ukrainian translations from
translationproject.org.

--HG--
branch : 1.8

13 years agoUpdate Esperanto, Finnish, Polish and Ukrainian translations from
Todd C. Miller [Wed, 11 Jan 2012 12:09:25 +0000 (07:09 -0500)]
Update Esperanto, Finnish, Polish and Ukrainian translations from
translationproject.org.

13 years agoAdd support for determining tty via sysctl on other BSD variants.
Todd C. Miller [Tue, 10 Jan 2012 21:50:20 +0000 (16:50 -0500)]
Add support for determining tty via sysctl on other BSD variants.

--HG--
branch : 1.8

13 years agoAdd support for determining tty via sysctl on other BSD variants.
Todd C. Miller [Tue, 10 Jan 2012 21:49:24 +0000 (16:49 -0500)]
Add support for determining tty via sysctl on other BSD variants.

13 years agoOnly check for struct kinfo_proc.ki_tdev on systems that support sysctl.
Todd C. Miller [Tue, 10 Jan 2012 18:03:59 +0000 (13:03 -0500)]
Only check for struct kinfo_proc.ki_tdev on systems that support sysctl.

--HG--
branch : 1.8

13 years agoFor FreeBSD, try the KERN_PROC_PID sysctl() first, falling back on
Todd C. Miller [Tue, 10 Jan 2012 18:03:49 +0000 (13:03 -0500)]
For FreeBSD, try the KERN_PROC_PID sysctl() first, falling back on
ttyname() of std{in,out,err}.

--HG--
branch : 1.8

13 years agoOnly check for struct kinfo_proc.ki_tdev on systems that support sysctl.
Todd C. Miller [Tue, 10 Jan 2012 18:02:55 +0000 (13:02 -0500)]
Only check for struct kinfo_proc.ki_tdev on systems that support sysctl.

13 years agoFor FreeBSD, try the KERN_PROC_PID sysctl() first, falling back on
Todd C. Miller [Tue, 10 Jan 2012 18:02:41 +0000 (13:02 -0500)]
For FreeBSD, try the KERN_PROC_PID sysctl() first, falling back on
ttyname() of std{in,out,err}.

13 years agoOn newer FreeBSD we can get the parent's tty name via sysctl().
Todd C. Miller [Mon, 9 Jan 2012 21:17:56 +0000 (16:17 -0500)]
On newer FreeBSD we can get the parent's tty name via sysctl().

--HG--
branch : 1.8

13 years agoInclude locale.h
Todd C. Miller [Mon, 9 Jan 2012 21:17:42 +0000 (16:17 -0500)]
Include locale.h

--HG--
branch : 1.8

13 years agoSilence a gcc warning.
Todd C. Miller [Mon, 9 Jan 2012 21:17:26 +0000 (16:17 -0500)]
Silence a gcc warning.

--HG--
branch : 1.8

13 years agoOn newer FreeBSD we can get the parent's tty name via sysctl().
Todd C. Miller [Mon, 9 Jan 2012 21:08:58 +0000 (16:08 -0500)]
On newer FreeBSD we can get the parent's tty name via sysctl().

13 years agoInclude locale.h
Todd C. Miller [Mon, 9 Jan 2012 20:34:05 +0000 (15:34 -0500)]
Include locale.h

13 years agoSilence a gcc warning.
Todd C. Miller [Mon, 9 Jan 2012 20:33:51 +0000 (15:33 -0500)]
Silence a gcc warning.

13 years agoNeed to include gettext.h and sudo_debug.h; from John Hein
Todd C. Miller [Mon, 9 Jan 2012 17:37:24 +0000 (12:37 -0500)]
Need to include gettext.h and sudo_debug.h; from John Hein

--HG--
branch : 1.8

13 years agoNeed to include gettext.h and sudo_debug.h; from John Hein
Todd C. Miller [Mon, 9 Jan 2012 17:36:43 +0000 (12:36 -0500)]
Need to include gettext.h and sudo_debug.h; from John Hein