Bug 581

Summary: Stack protection compiler option causes build failure on Solaris 10
Product: Sudo Reporter: Sean McGovern <gseanmcg>
Component: ConfigureAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: low    
Version: 1.8.6   
Hardware: PC   
OS: Solaris 2.x   

Description Sean McGovern 2012-12-31 20:27:27 MST
Adding -fstack-protector to the command generated by libtool allows this and other binaries to build successfully.

libtool: link: i386-pc-solaris2.10-gcc-4.6.3 -o visudo visudo.o goodpath.o find_path.o error.o -pie  -L/usr/local/ssl/lib ./.libs/libparsesudoers.a ../../common/.libs/libcommon.a ../../compat/.libs/libreplace.a -lintl -lsocket -lnsl -R/usr/local/ssl/lib
Undefined                       first referenced
 symbol                             in file
__stack_chk_fail_local              visudo.o  (symbol scope specifies local binding)
__stack_chk_guard                   visudo.o
ld: fatal: symbol referencing errors. No output written to visudo
collect2: ld returned 1 exit status
Comment 1 Sean McGovern 2012-12-31 20:27:52 MST
Oops, wrong version -- this is from 1.8.6_p3.
Comment 2 Todd C. Miller 2013-01-01 07:51:01 MST
Currently, -fstack-protector is part of LT_LDFLAGS which is only used when building shared objects.  It should probably be split out into its own setting as was done for the PIE flags.
Comment 3 Todd C. Miller 2013-01-16 11:51:55 MST
Fixed in sudo 1.8.6p4.