]> granicus.if.org Git - sudo/log
sudo
11 years agoDon't escape '$' when running "sudo -i command". Bug #564
Todd C. Miller [Mon, 19 Aug 2013 16:40:05 +0000 (10:40 -0600)]
Don't escape '$' when running "sudo -i command".  Bug #564

11 years agoFix typo in comment.
Todd C. Miller [Mon, 19 Aug 2013 15:19:52 +0000 (09:19 -0600)]
Fix typo in comment.

11 years agoFix comment.
Todd C. Miller [Mon, 19 Aug 2013 15:19:24 +0000 (09:19 -0600)]
Fix comment.

11 years agoQuiet some gcc -Wformat=2 false positives
Todd C. Miller [Mon, 19 Aug 2013 12:39:33 +0000 (06:39 -0600)]
Quiet some gcc -Wformat=2 false positives

11 years agoRemove now-obsolete arg to env_merge()
Todd C. Miller [Sun, 18 Aug 2013 20:33:35 +0000 (14:33 -0600)]
Remove now-obsolete arg to env_merge()

11 years agoUpdated translations from translationproject.org
Todd C. Miller [Sun, 18 Aug 2013 20:25:23 +0000 (14:25 -0600)]
Updated translations from translationproject.org

11 years agoFrench translation for sudo from translationproject.org.
Todd C. Miller [Sun, 18 Aug 2013 20:25:04 +0000 (14:25 -0600)]
French translation for sudo from translationproject.org.

11 years agoAdd __printflike to audit_failure.
Todd C. Miller [Sun, 18 Aug 2013 20:21:29 +0000 (14:21 -0600)]
Add __printflike to audit_failure.

11 years agoUse __nonnull__ attribute in __printflike.
Todd C. Miller [Sun, 18 Aug 2013 20:18:55 +0000 (14:18 -0600)]
Use __nonnull__ attribute in __printflike.

11 years agoWhen merging the PAM environment, allow environment variables set
Todd C. Miller [Sat, 17 Aug 2013 12:34:09 +0000 (06:34 -0600)]
When merging the PAM environment, allow environment variables set
in PAM to override ones set by sudo as long as they do not match
the env_keep or env_check lists.

11 years agoCall pam_getenvlist() after we've opened the session to get the
Todd C. Miller [Sat, 17 Aug 2013 12:22:46 +0000 (06:22 -0600)]
Call pam_getenvlist() after we've opened the session to get the
session-specific environment variables.

11 years agooption not flag
Todd C. Miller [Fri, 16 Aug 2013 20:56:59 +0000 (14:56 -0600)]
option not flag

11 years agoDon't redefine opterr, optind, optopt, optarg in getopt_long.c.
Todd C. Miller [Fri, 16 Aug 2013 19:50:48 +0000 (13:50 -0600)]
Don't redefine opterr, optind, optopt, optarg in getopt_long.c.
Add a check for optreset which is a BSD extension and provide a
definition in getopt_long.c if it is not present.

11 years agoregen
Todd C. Miller [Fri, 16 Aug 2013 16:18:34 +0000 (10:18 -0600)]
regen

11 years agoUse lower case for the long option arguments to match the manual.
Todd C. Miller [Fri, 16 Aug 2013 16:17:47 +0000 (10:17 -0600)]
Use lower case for the long option arguments to match the manual.
This is inconsistent with GNU but it is better to match the sudo
documentation.

11 years agoSudo 1.8.8
Todd C. Miller [Fri, 16 Aug 2013 16:14:45 +0000 (10:14 -0600)]
Sudo 1.8.8

11 years agoUse lower card for the long option arguments to match the manual.
Todd C. Miller [Fri, 16 Aug 2013 15:41:46 +0000 (09:41 -0600)]
Use lower card for the long option arguments to match the manual.
This is inconsistent with GNU but it is better to match the sudo
documentation.

11 years agoDescribe how remote command execution can be implemented.
Todd C. Miller [Fri, 16 Aug 2013 15:31:46 +0000 (09:31 -0600)]
Describe how remote command execution can be implemented.

11 years agoBump version.
Todd C. Miller [Fri, 16 Aug 2013 15:30:50 +0000 (09:30 -0600)]
Bump version.

11 years agoMake it a fatal error if the plugin returns invalid or out of range
Todd C. Miller [Thu, 15 Aug 2013 22:39:47 +0000 (16:39 -0600)]
Make it a fatal error if the plugin returns invalid or out of range
command info.

11 years agoUse strtol() instead of atoi() and perform error checking
Todd C. Miller [Thu, 15 Aug 2013 22:20:15 +0000 (16:20 -0600)]
Use strtol() instead of atoi() and perform error checking
of parameters passed from the sudo front-end.

11 years agoIt is not possible for auth to be NULL here.
Todd C. Miller [Thu, 15 Aug 2013 21:22:50 +0000 (15:22 -0600)]
It is not possible for auth to be NULL here.

11 years agoInitialize user_runhost and user_srunhost to user_host and user_shost
Todd C. Miller [Thu, 15 Aug 2013 20:26:51 +0000 (14:26 -0600)]
Initialize user_runhost and user_srunhost to user_host and user_shost
in visudo and testsudoers.

11 years agoRename error.h -> fatal.h now that there is no error() function.
Todd C. Miller [Thu, 15 Aug 2013 20:24:29 +0000 (14:24 -0600)]
Rename error.h -> fatal.h now that there is no error() function.

11 years agoAdd support to the debug subsystem for zero-length strings. This
Todd C. Miller [Thu, 15 Aug 2013 20:09:53 +0000 (14:09 -0600)]
Add support to the debug subsystem for zero-length strings.  This
can happen for things like warning(NULL) or fatal(NULL) where we
just want to log the errno string.

11 years agoAdd __printflike for vfatal, vfatalx, vwarning and vwarningx.
Todd C. Miller [Thu, 15 Aug 2013 20:08:40 +0000 (14:08 -0600)]
Add __printflike for vfatal, vfatalx, vwarning and vwarningx.

11 years agoNeed to include gettext.h for BSM audit.
Todd C. Miller [Thu, 15 Aug 2013 19:36:25 +0000 (13:36 -0600)]
Need to include gettext.h for BSM audit.

11 years agoChange some fatalx(NULL) that should be fatal(NULL).
Todd C. Miller [Thu, 15 Aug 2013 19:06:49 +0000 (13:06 -0600)]
Change some fatalx(NULL) that should be fatal(NULL).

11 years agoUse __printf0like for warning() and fatal() since the fmt string
Todd C. Miller [Thu, 15 Aug 2013 18:58:24 +0000 (12:58 -0600)]
Use __printf0like for warning() and fatal() since the fmt string
may be NULL.

11 years agoQuiet a gcc "used uninitialized in this function" false positive.
Todd C. Miller [Thu, 15 Aug 2013 16:49:06 +0000 (10:49 -0600)]
Quiet a gcc "used uninitialized in this function" false positive.

11 years agoEnable bsm audit on Mac OS X and Solaris >= 11.
Todd C. Miller [Thu, 15 Aug 2013 16:41:48 +0000 (10:41 -0600)]
Enable bsm audit on Mac OS X and Solaris >= 11.

11 years agoFix compilation on Solaris 11.
Todd C. Miller [Thu, 15 Aug 2013 16:39:40 +0000 (10:39 -0600)]
Fix compilation on Solaris 11.

11 years agoAdd missing missing.h
Todd C. Miller [Thu, 15 Aug 2013 16:08:27 +0000 (10:08 -0600)]
Add missing missing.h

11 years agoMove the -C (user_closefrom) check until after set_cmnd() so that
Todd C. Miller [Thu, 15 Aug 2013 15:56:17 +0000 (09:56 -0600)]
Move the -C (user_closefrom) check until after set_cmnd() so that
closefrom_override can be used in a command-specific Defaults line.
Fixes bug #610 from Mengtao Sun.

11 years agoIf not using a pty and the child process gets SIGTTOU or SIGTTIN
Todd C. Miller [Wed, 14 Aug 2013 22:36:41 +0000 (16:36 -0600)]
If not using a pty and the child process gets SIGTTOU or SIGTTIN
and sudo is the foreground process, make the child the foreground
process and continue it.

11 years agoIf sudo is not setuid and was not invoked with a full path, look
Todd C. Miller [Wed, 14 Aug 2013 20:22:16 +0000 (14:22 -0600)]
If sudo is not setuid and was not invoked with a full path, look
in the user's PATH for the sudo binary to give a better error
message.

11 years agoAdd limited support for "sudo -l -h other_host". Since group lookups
Todd C. Miller [Wed, 14 Aug 2013 19:49:14 +0000 (13:49 -0600)]
Add limited support for "sudo -l -h other_host".  Since group lookups
are done on the local host, rules that use group membership may be
incorrect if the group database is not synchronized between hosts.

11 years agoFix parsing of "-h host" when used in conjunction with the -l flag.
Todd C. Miller [Wed, 14 Aug 2013 19:41:47 +0000 (13:41 -0600)]
Fix parsing of "-h host" when used in conjunction with the -l flag.

11 years agoSimplify usage messages a bit and make --help output more closely
Todd C. Miller [Wed, 14 Aug 2013 16:30:51 +0000 (10:30 -0600)]
Simplify usage messages a bit and make --help output more closely
resemble GNU usage wrt long options.  Sync usage and man page
SYNOPSYS sections and improve long options in the manual pages.
Now that we have long options we don't need to give the mnemonic
for the single-character options in the description.

11 years agoFix setting of mailer argv[0] to basename of mailerpath.
Todd C. Miller [Tue, 13 Aug 2013 20:53:55 +0000 (14:53 -0600)]
Fix setting of mailer argv[0] to basename of mailerpath.
No need to strdup() mailerpath as it is not modified.

11 years agoMake sure the mailer exists and is a regular file before trying
Todd C. Miller [Tue, 13 Aug 2013 20:48:24 +0000 (14:48 -0600)]
Make sure the mailer exists and is a regular file before trying
to exec it.

11 years agoIf tty_tickets are enabled but there is no tty, use a ticket file
Todd C. Miller [Tue, 13 Aug 2013 18:55:17 +0000 (12:55 -0600)]
If tty_tickets are enabled but there is no tty, use a ticket file
based on the parent pid.

11 years agoAllow default plugin dir to be configured in sudo.conf.
Todd C. Miller [Tue, 13 Aug 2013 18:24:28 +0000 (12:24 -0600)]
Allow default plugin dir to be configured in sudo.conf.

11 years agoUTF8 for Ruusamae, Elan; from Tae Wong
Todd C. Miller [Tue, 13 Aug 2013 16:37:52 +0000 (10:37 -0600)]
UTF8 for Ruusamae, Elan; from Tae Wong

11 years agoDon't allow max_groups to be set to zero, it just complicates things
Todd C. Miller [Mon, 12 Aug 2013 15:14:38 +0000 (09:14 -0600)]
Don't allow max_groups to be set to zero, it just complicates things
needlessly.  Fixes an assertion in visudo when there is a group-based
Defaults entry.

11 years agoRefactor code to parse list of gids into its own function that is
Todd C. Miller [Thu, 8 Aug 2013 17:40:36 +0000 (11:40 -0600)]
Refactor code to parse list of gids into its own function that is
shared by the sudo front-end and the sudoers module.
Make uid/gid parse error be fatal, not just a warning.

11 years agoAdd function comment block.
Todd C. Miller [Thu, 8 Aug 2013 17:38:39 +0000 (11:38 -0600)]
Add function comment block.

11 years agoDefault text domain is now sudo, not sudoers.
Todd C. Miller [Thu, 8 Aug 2013 16:37:25 +0000 (10:37 -0600)]
Default text domain is now sudo, not sudoers.

11 years agoUpdate dependency for atoid.lo
Todd C. Miller [Thu, 8 Aug 2013 14:39:58 +0000 (08:39 -0600)]
Update dependency for atoid.lo

11 years agoAdd endpointer and separator args to atoid()
Todd C. Miller [Thu, 8 Aug 2013 12:11:52 +0000 (06:11 -0600)]
Add endpointer and separator args to atoid()

11 years agoUse private version of atoid() to avoid a dependency on libcommon.a
Todd C. Miller [Wed, 7 Aug 2013 22:52:50 +0000 (16:52 -0600)]
Use private version of atoid() to avoid a dependency on libcommon.a
(since that already depends on libreplace.a).

11 years agoMore UTF8 in names; from Tae Wong
Todd C. Miller [Wed, 7 Aug 2013 22:07:14 +0000 (16:07 -0600)]
More UTF8 in names; from Tae Wong

11 years agoUse atoid() in more places.
Todd C. Miller [Wed, 7 Aug 2013 21:49:03 +0000 (15:49 -0600)]
Use atoid() in more places.

11 years agoMove atoid() to common so it can be used in src and compat too.
Todd C. Miller [Wed, 7 Aug 2013 21:10:45 +0000 (15:10 -0600)]
Move atoid() to common so it can be used in src and compat too.

11 years agoAvoid a crash on Mac OS X 10.8 (at least) when we close libdispatch's
Todd C. Miller [Wed, 7 Aug 2013 21:04:58 +0000 (15:04 -0600)]
Avoid a crash on Mac OS X 10.8 (at least) when we close libdispatch's
fds out from under it before executing the command.  Switch to just
setting the close on exec flag instead.

11 years agoConvert to last, first for easier sorting and use UTF8 (including a
Todd C. Miller [Wed, 7 Aug 2013 20:14:05 +0000 (14:14 -0600)]
Convert to last, first for easier sorting and use UTF8 (including a
BOM).

11 years agoAdd atoid() function to convert a string to an id_t (uid, gid or
Todd C. Miller [Wed, 7 Aug 2013 19:13:56 +0000 (13:13 -0600)]
Add atoid() function to convert a string to an id_t (uid, gid or
pid).  We have to be careful to choose() either strtol() or strtoul()
depending on whether the string appears to be signed or unsigned.
Always using strtoul() is unsafe on 64-bit platforms since the
uid might be represented as a negative number and (unsigned long)-1
on a 64-bit system is 0xffffffffffffffff not 0xffffffff.
Fixes a problem with uids larger than 0x7fffffff on 32-bit platforms.

11 years agoAdd atoid() function to convert a string to an id_t (uid, gid or
Todd C. Miller [Wed, 7 Aug 2013 17:23:19 +0000 (11:23 -0600)]
Add atoid() function to convert a string to an id_t (uid, gid or
pid).  We have to be careful to choose() either strtol() or strtoul()
depending on whether the string appears to be signed or unsigned.
Always using strtoul() is unsafe on 64-bit platforms since the
uid might be represented as a negative number and (unsigned long)-1
on a 64-bit system is 0xffffffffffffffff not 0xffffffff.
Fixes a problem with uids larger than 0x7fffffff on 32-bit platforms.

11 years agoAvoid "perm stack underflow" error when logging the unknown uid error.
Todd C. Miller [Wed, 7 Aug 2013 16:13:04 +0000 (10:13 -0600)]
Avoid "perm stack underflow" error when logging the unknown uid error.

11 years agoIn rewind_perms() there is nothing to do if perm_stack_depth == 0.
Todd C. Miller [Wed, 7 Aug 2013 15:42:14 +0000 (09:42 -0600)]
In rewind_perms() there is nothing to do if perm_stack_depth == 0.

11 years agoAdd pam_setcred sudoers option to allow the user to control whether
Todd C. Miller [Tue, 6 Aug 2013 20:44:21 +0000 (14:44 -0600)]
Add pam_setcred sudoers option to allow the user to control whether
pam_setcred() is called on the user's behalf.

11 years agoAdd pam_service and pam_login_service sudoers settings to control
Todd C. Miller [Tue, 6 Aug 2013 17:01:36 +0000 (11:01 -0600)]
Add pam_service and pam_login_service sudoers settings to control
the service name passed to pam_start.

11 years agoNewer Xcode places the SDKs under Xcode.app
Todd C. Miller [Tue, 6 Aug 2013 16:58:50 +0000 (10:58 -0600)]
Newer Xcode places the SDKs under Xcode.app

11 years agoImplement memset_s() and use it instead of zero_bytes().
Todd C. Miller [Sat, 3 Aug 2013 14:30:06 +0000 (08:30 -0600)]
Implement memset_s() and use it instead of zero_bytes().
A new constant, SUDO_CONV_REPL_MAX, is defined by the plugin
API as the max conversation reply length.  This constant can be
used as a max value for memset_s() when clearing passwords
filled in by the conversation function.

11 years agoDo not try to install plugins when shared modules are disabled
Todd C. Miller [Thu, 1 Aug 2013 16:51:46 +0000 (10:51 -0600)]
Do not try to install plugins when shared modules are disabled
(sudoers already had the check).

11 years agoUpdate dependencies to take into account compat/getopt.h and
Todd C. Miller [Thu, 1 Aug 2013 16:51:06 +0000 (10:51 -0600)]
Update dependencies to take into account compat/getopt.h and
compat/dlfcn.h.

11 years agoUpdate dependencies now that sudo_usage.h is always included from
Todd C. Miller [Thu, 1 Aug 2013 16:50:05 +0000 (10:50 -0600)]
Update dependencies now that sudo_usage.h is always included from
the build dir.

11 years agoAdd some warnings and debugging to sasl ccname handling.
Todd C. Miller [Wed, 31 Jul 2013 21:20:14 +0000 (15:20 -0600)]
Add some warnings and debugging to sasl ccname handling.

11 years agoFix write loop invariant in sudo_krb5_copy_cc_file()
Todd C. Miller [Wed, 31 Jul 2013 21:03:46 +0000 (15:03 -0600)]
Fix write loop invariant in sudo_krb5_copy_cc_file()

11 years agoStrip off leading FILE: or WRFILE: prefix before trying to copy
Todd C. Miller [Tue, 30 Jul 2013 21:37:04 +0000 (15:37 -0600)]
Strip off leading FILE: or WRFILE: prefix before trying to copy
the user's credential cache.

11 years agoInstead of setting RLIMIT_NPROC to unlimited when sudo initializes,
Todd C. Miller [Mon, 29 Jul 2013 21:34:49 +0000 (15:34 -0600)]
Instead of setting RLIMIT_NPROC to unlimited when sudo initializes,
just save RLIMIT_NPROC in exec_setup() before the final setuid()
and restore it immediately after.  We don't need to modify RLIMIT_NPROC
for simple euid changes, just for changing the real (and saved)
uids before we exec.  This also means we no longer need to worry
about _SC_CHILD_MAX returning -1.  Bug #565

11 years agoNow that the ldap code runs with the real and effective uid set to
Todd C. Miller [Sun, 28 Jul 2013 23:06:43 +0000 (17:06 -0600)]
Now that the ldap code runs with the real and effective uid set to
0, it is not possible for the gssapi libs to find the user's krb5
credential cache file.  To work around this, we make a temporary
copy of the user's credential cache specified by KRB5CCNAME (opened
with the user's effective uid) and point gssapi to it.  To set the
credential cache file name, we dynamically look up gss_krb5_ccache_name()
and use it if available, otherwise fall back to setting KRB5CCNAME.

11 years agoLong option support for visudo and sudoreplay.
Todd C. Miller [Fri, 19 Jul 2013 15:42:25 +0000 (09:42 -0600)]
Long option support for visudo and sudoreplay.

11 years agoAdd support for long options and fix inclusion of sudo_usage.h with
Todd C. Miller [Thu, 18 Jul 2013 22:51:56 +0000 (16:51 -0600)]
Add support for long options and fix inclusion of sudo_usage.h with
modern gcc broken in 8597:1fcb7ba13018.

11 years agoAdd rule to rebuild sudo_usage.h when the .in file changes.
Todd C. Miller [Thu, 18 Jul 2013 20:29:30 +0000 (14:29 -0600)]
Add rule to rebuild sudo_usage.h when the .in file changes.

11 years agoAdd make rules for building getopt_long.c
Todd C. Miller [Thu, 18 Jul 2013 16:07:41 +0000 (10:07 -0600)]
Add make rules for building getopt_long.c

11 years agoMake "-h hostname" work. Optional args in GNU getopt() only work
Todd C. Miller [Thu, 18 Jul 2013 16:02:43 +0000 (10:02 -0600)]
Make "-h hostname" work.  Optional args in GNU getopt() only work
when there is no space between the option flag and the argument.

11 years agoUse getopt_long() so we can make the -h flag take an optional argument.
Todd C. Miller [Wed, 17 Jul 2013 23:00:55 +0000 (17:00 -0600)]
Use getopt_long() so we can make the -h flag take an optional argument.
Includes a version for those without it.

11 years agoDocument that the -h option can be used specify a host name for future
Todd C. Miller [Tue, 16 Jul 2013 22:31:59 +0000 (16:31 -0600)]
Document that the -h option can be used specify a host name for future
plugins.

11 years agoOverload -h option to specify an optional hostname for remote access.
Todd C. Miller [Tue, 16 Jul 2013 22:31:05 +0000 (16:31 -0600)]
Overload -h option to specify an optional hostname for remote access.
This is future-proofing; no policy plugins currently support this.

11 years agoBump version to 1.8.8
Todd C. Miller [Tue, 16 Jul 2013 22:29:42 +0000 (16:29 -0600)]
Bump version to 1.8.8

11 years agoDocument the remote_host setting (-h host)
Todd C. Miller [Tue, 16 Jul 2013 22:21:14 +0000 (16:21 -0600)]
Document the remote_host setting (-h host)

11 years agofix "the the"
Todd C. Miller [Tue, 16 Jul 2013 22:18:14 +0000 (16:18 -0600)]
fix "the the"

11 years agoDo not error out if arg to -U option cannot be resolved, that is for
Todd C. Miller [Tue, 16 Jul 2013 20:04:23 +0000 (14:04 -0600)]
Do not error out if arg to -U option cannot be resolved, that is for
the plugin to decide.
There is no need for runas_user and runas_group to be global, make
them local to parse_args() instead.

11 years agoSync with translationproject.org
Todd C. Miller [Tue, 16 Jul 2013 13:32:57 +0000 (07:32 -0600)]
Sync with translationproject.org

11 years agoRemove old bits about sudo setuid problems that should have been
Todd C. Miller [Thu, 11 Jul 2013 21:57:40 +0000 (17:57 -0400)]
Remove old bits about sudo setuid problems that should have been
cleaned up in changeset 7917:fa4894896d8a.  Also update the mode
of sudo to 04755 to match current packaging.

11 years agoGo back to ignoring the return value of pam_setcred() since with
Todd C. Miller [Thu, 11 Jul 2013 21:50:03 +0000 (17:50 -0400)]
Go back to ignoring the return value of pam_setcred() since with
stacked PAM auth modules a failure from one module may override
PAM_SUCCESS from another.  If the first module in the stack fails,
the others may be run (and succeed) but an error will be returned.
This can cause a spurious warning on systems with non-local users
(e.g. pam_ldap or pam_sss) where pam_unix is consulted first.

11 years agoRemove unused variable.
Todd C. Miller [Thu, 11 Jul 2013 21:47:39 +0000 (17:47 -0400)]
Remove unused variable.

11 years agoFix typo
Todd C. Miller [Thu, 11 Jul 2013 20:31:36 +0000 (16:31 -0400)]
Fix typo

11 years agoFix pasto; sudo_sss_extract_digest() not sudo_ldap_extract_digest().
Todd C. Miller [Tue, 9 Jul 2013 16:35:26 +0000 (10:35 -0600)]
Fix pasto; sudo_sss_extract_digest() not sudo_ldap_extract_digest().
From Dan Harnett.

11 years agoFix formatting typo; from Eric S. Raymond
Todd C. Miller [Tue, 18 Jun 2013 10:39:02 +0000 (06:39 -0400)]
Fix formatting typo; from Eric S. Raymond

11 years agoUse -gxcoff on aix so dbx can be used to debug sudo.
Todd C. Miller [Mon, 17 Jun 2013 20:48:32 +0000 (16:48 -0400)]
Use -gxcoff on aix so dbx can be used to debug sudo.

11 years agoFix typo; bug 605
Todd C. Miller [Wed, 12 Jun 2013 13:15:11 +0000 (09:15 -0400)]
Fix typo; bug 605

11 years agoRegen .mo files that were out of date.
Todd C. Miller [Tue, 4 Jun 2013 09:47:19 +0000 (05:47 -0400)]
Regen .mo files that were out of date.

11 years agoOn Solaris 11 and higher, tag binaries for ASLR if supported by the
Todd C. Miller [Thu, 30 May 2013 13:29:36 +0000 (09:29 -0400)]
On Solaris 11 and higher, tag binaries for ASLR if supported by the
linker.

11 years agoNo longer need to disable PIE on Solaris.
Todd C. Miller [Thu, 30 May 2013 13:11:30 +0000 (09:11 -0400)]
No longer need to disable PIE on Solaris.

11 years agoRestrict default creation of PIE binaries (-fPIE and -pie) to Linux.
Todd C. Miller [Tue, 28 May 2013 18:40:45 +0000 (14:40 -0400)]
Restrict default creation of PIE binaries (-fPIE and -pie) to Linux.
OpenBSD also supports PIE but enables it by default so we don't
need to do anything.  This fixes problems on systems with a version
of GNU ld that accepts -pie but where the run-time linker doesn't
actually support PIE.  Also verify that a trivial PIE binary works
unless PIE is explicitly enabled.

11 years agoAttempt to detect PIE failure on Solaris 10 with GNU as and GNU ld
Todd C. Miller [Fri, 24 May 2013 20:47:16 +0000 (16:47 -0400)]
Attempt to detect PIE failure on Solaris 10 with GNU as and GNU ld
where we can end up crashing due to malloc() failures.  Sems OK
when Using Sun as and ld.

11 years agoUpdate with final changes.
Todd C. Miller [Fri, 24 May 2013 15:26:41 +0000 (11:26 -0400)]
Update with final changes.

11 years agoAdd -fPIE to PIE_LDFLAGS as per gcc manual.
Todd C. Miller [Fri, 24 May 2013 02:47:28 +0000 (22:47 -0400)]
Add -fPIE to PIE_LDFLAGS as per gcc manual.