pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/34422: security/sudo doesn't link



The following reply was made to PR pkg/34422; it has been noted by GNATS.

From: Jon Olsson <jon%univits.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/34422: security/sudo doesn't link
Date: Thu, 31 Aug 2006 11:24:12 +0200

 On 2006-08-30, at 18.10, Joerg Sonnenberger wrote:
 
 > The following reply was made to PR pkg/34422; it has been noted by  
 > GNATS.
 >
 > From: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc:
 > Subject: Re: pkg/34422: security/sudo doesn't link
 > Date: Wed, 30 Aug 2006 18:00:46 +0200
 >
 >  On Wed, Aug 30, 2006 at 02:10:00PM +0000, jon%univits.com@localhost wrote:
 >> checking for isblank... yes
 >
 >  Strange...
 >
 >> Undefined                       first referenced
 >>  symbol                             in file
 >> isblank                             sudo_edit.o
 >
 >  (a) Is isblank defined in ctype.h?
 >  If yes: is it perhaps not in libc, but some other library?
 >  If no: Can you compile the following program with warnings  
 > enabling and
 >  show me the result?
 >
 >  #include <ctype.h>
 >  int
 >  main (void)
 >  {
 >  (void)isblank(1);
 >    ;
 >    return 0;
 >  }
 
 Yes, seems it's defined somewhere, don't know where though:
 
 $ grep isblank /usr/include/*.h
 $ grep isblank /usr/include/**/*.h
 /usr/include/unicode/uchar.h: * like isblank(). Their use is  
 generally discouraged because the C/POSIX
 /usr/include/unicode/uchar.h: * - u_isblank: "horizontal spaces" =  
 TAB + Zs - ZWSP
 /usr/include/unicode/uchar.h:u_isblank(UChar32 c);
 /usr/include/unicode/urename.h:#define u_isblank u_isblank_3_2
 
 Program output:
 $ gcc -Wall x.c
 x.c: In function 'main':
 x.c:5: warning: implicit declaration of function 'isblank'
 $ ./a.out
 $ ldd a.out
          libc.so.1 =>     /usr/lib/libc.so.1
          libdl.so.1 =>    /usr/lib/libdl.so.1
          /usr/platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1
 $ nm /usr/lib/libc.so.1|grep isblank
 $ nm /usr/lib/libdl.so.1|grep isblank
 $ nm /usr/platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1|grep isblank
 $
 
 
 >
 >> --- sudo_edit.c.orig    2004-11-25 15:32:34.000000000 -0200
 >> +++ sudo_edit.c
 >> @@ -205,6 +205,9 @@ int sudo_edit(argc, argv)
 >>       */
 >>      nargc = argc;
 >>      for (cp = editor + 1; *cp != '\0'; cp++) {
 >> +#if defined(__SVR4) && defined(__sun)
 >> +#define isblank(c) (c == ' ' ||c == '\t' ||c == '\r' ||c == '\n')
 >> +#endif
 >
 >  This is incorrect, since isblank(c) is true for c == ' ' || c == '\t'
 >  only.
 
 Indeed.
 
 Jon
 
 
 



Home | Main Index | Thread Index | Old Index