Bug 968

Summary: S_ISFIFO redefined
Product: Sudo Reporter: Pavel Heimlich <tropikhajma>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: low CC: mehmetgelisin
Priority: low    
Version: 1.9.5   
Hardware: All   
OS: Solaris 2.x   
Attachments: patch

Description Pavel Heimlich 2021-03-10 04:36:25 MST
Created attachment 554 [details]
patch

I found the macros S_ISFIFO, S_ISDIR, S_ISREG, S_ISLNK are being redefined in the sudo build:

Warning: Macro redefinition
   Macro redefinition [macro-redefinition]:
      'S_ISDIR' macro redefined
        at line 395 of /usr/include/sys/stat.h.
        previous definition is at line 167 of /builds/pheimlic/sudo19/components/sudo/sudo-1.9.5p2/include/sudo_compat.h

The attached patch fixes it for me.


This is on Solaris 11.4 with sudo 1.9.5p2
Comment 1 Todd C. Miller 2021-03-10 12:53:08 MST
I was unable to reproduce that problem on Solaris 11.4 with either gcc  version 7.3.0 or developer studio 12.6.  However, I don't think those compatibility macros are actually needed any more.  They date from a time when I couldn't assume a POSIX system.

The following commit removes them:
https://www.sudo.ws/repos/sudo/rev/d10d0b9b60e1
Comment 2 Todd C. Miller 2021-03-14 08:40:05 MDT
Closing since those macros were removed in sudo 1.9.6.