Return-Path: Delivered-To: apache-bugdb-archive@hyperreal.org Received: (qmail 23494 invoked by uid 6000); 19 Feb 1998 16:23:59 -0000 Received: (qmail 23482 invoked from network); 19 Feb 1998 16:23:57 -0000 Received: from bbmail1.unisys.com (192.63.200.5) by taz.hyperreal.org with SMTP; 19 Feb 1998 16:23:57 -0000 Received: from BBFIRST.BB.UNISYS.COM (bbfirst.bb.unisys.com [192.63.78.197]) by bbmail1.unisys.com (8.8.5/8.8.5) with SMTP id QAA04857; Thu, 19 Feb 1998 16:25:08 GMT Received: by BBFIRST.BB.UNISYS.COM(Lotus SMTP MTA SMTP v4.6 (462.2 9-3-1997)) id 852565B0.005A1BF1 ; Thu, 19 Feb 1998 11:24:13 -0500 X-Lotus-FromDomain: UNISYS From: "Roy Wood" To: dgaudet@hyperreal.org cc: Apbugs@Apache.Org, Apache-Bugdb@Apache.Org, Dgaudet@Apache.Org Message-ID: <852565B0.005846A2.00@BBFIRST.BB.UNISYS.COM> Date: Thu, 19 Feb 1998 11:24:13 -0500 Subject: Re: os-unixware/1357: Server incorrectly interprets whether file is a symlink. Mime-Version: 1.0 Content-type: multipart/mixed; Boundary="0__=pQJFBByXqzan73O8nbCZfsZ8Yqf26DdBkfzEro5oQQukAX4p7Krwmumn" Sender: apache-bugdb-owner@apache.org Precedence: bulk --0__=pQJFBByXqzan73O8nbCZfsZ8Yqf26DdBkfzEro5oQQukAX4p7Krwmumn Content-type: text/plain; charset=us-ascii I am sorry it took so long to get back to you (so much to do, so little time). I don't think compiling without _POSIX_SOURCE defined affects anything else. We have been running with this change since I submitted it. We are running Stronghold 2.1 with all modules compiled without the _POSIX_SOURCE defined. We are running Unixware 2.1.2. I am assuming that this bug exists in all 2.1 releases. We tried to report the bug and get it fixed through Unisys/Unixware but we were told that the stat function wasn't part of the POSIX spec that they coded to and we were out of luck. Our argument that it was obviously broken and existing fuctions shouldn't break fell on deaf ears. I am enclosing the results of a test program we ran to troubleshoot the problem. Compiling with _POSIX_SOURCE defined causes the stat function to return the time rather than the file type. Depending on the time the function was called determines whether the function thinks the file is a link or not (real fun to figure out). If you have any other questions, please let me know. Regards, Roy Wood Script started on Thu Feb 19 09:49:06 1998 IH19:/work/acct/roy/src>cat Makefile PROGRAM =linktest CFLAGS = -g \ -DCOMPILED=\"`date +%D_%T`\" #CFLAGS = -g \ # -D_POSIX_SOURCE -DCOMPILED=\"`date +%D_%T`\" OBJS = linktest.o $(PROGRAM): $(OBJS) cc $(OBJS) $(CFLAGS) -o $(PROGRAM) linktest.o: linktest.c all: make $(PROGRAM) clean: rm -f *.o core.* IH19:/work/acct/roy/src>cat linktest.c #include #include #include main(argc,argv) int argc; char **argv; { struct stat x_stat; if(!lstat(argv[1], &x_stat)) { printf("Good stat of file \"%s\"\n", argv[1]); printf("st_atime=%0x\n", x_stat.st_atime); printf("st_mode=%0x\n", x_stat.st_mode); printf("st_xmode0=%0x\n", *((int *)((char *)(&x_stat) + 0))); printf("st_xmode4=%0x\n", *((int *)((char *)(&x_stat) + 4))); printf("st_xmode8=%0x\n", *((int *)((char *)(&x_stat) + 8))); printf("st_xmode12=%0x\n", *((int *)((char *)(&x_stat) + 12))); printf("st_xmode16=%0x\n", *((int *)((char *)(&x_stat) + 16))); printf("st_xmode20=%0x\n", *((int *)((char *)(&x_stat) + 20))); printf("st_xmode24=%0x\n", *((int *)((char *)(&x_stat) + 24))); printf("offset=%d\n", ((int)(&((struct stat *)NULL)->st_mode))); } else { printf("Bad stat of file \"%s\"\n", argv[1]); } } IH19:/work/acct/roy/src>make clean rm -f *.o core.* IH19:/work/acct/roy/src>make cc -g -DCOMPILED=\"`date +%D_%T`\" -c linktest.c cc linktest.o -g -DCOMPILED=\"`date +%D_%T`\" -o linktest IH19:/work/acct/roy/src>linktest link Good stat of file "link" st_atime=34ec51f6 st_mode=a1ff st_xmode0=88020c st_xmode4=0 st_xmode8=0 st_xmode12=0 st_xmode16=24d st_xmode20=a1ff st_xmode24=1 offset=20 IH19:/work/acct/roy/src>make clean rm -f *.o core.* IH19:/work/acct/roy/src>make cc -g -D_POSIX_SOURCE -DCOMPILED=\"`date +%D_%T`\" -c linktest.c cc linktest.o -g -D_POSIX_SOURCE -DCOMPILED=\"`date +%D_%T`\" -o linktest IH19:/work/acct/roy/src>linktest link Good stat of file "link" st_atime=7fffffff st_mode=34ec51f6 st_xmode0=24d3206 st_xmode4=1a1ff st_xmode8=c9040a st_xmode12=0 st_xmode16=5 st_xmode20=34ec51f6 st_xmode24=34ec5158 offset=20 IH19:/work/acct/roy/src>exit script done on Thu Feb 19 09:51:30 1998 (Embedded image moved dgaudet@hyperreal.org to file: 02/07/98 06:21 AM PIC30119.PCX) To: apache-bugdb@apache.org, dgaudet@apache.org, Roy Wood/GCS/US/Unisys cc: Subject: Re: os-unixware/1357: Server incorrectly interprets whether file is a symlink. [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] Synopsis: Server incorrectly interprets whether file is a symlink. State-Changed-From-To: open-analyzed State-Changed-By: dgaudet State-Changed-When: Sat Feb 7 04:21:28 PST 1998 State-Changed-Why: I'm really confused by this. We don't have anyone who uses unixware, so we can't really test out your suggestion. Are you sure this doesn't affect anything else? Have you tried building all the modules without _POSIX_SOURCE ? Will it work on all 2.x versions of unixware? Thanks Dean --0__=pQJFBByXqzan73O8nbCZfsZ8Yqf26DdBkfzEro5oQQukAX4p7Krwmumn Content-type: application/octet-stream; name="PIC30119.PCX" Content-transfer-encoding: base64 CgUBCAAAAABoACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAABaQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAD1E9sTzRPHE8MTwhP1E9sTzRPHE8MTwhP1E9sTzRPHE8MTwhP1E9sTzRPH E8MTwhP1E9sTzRPHE8MTwhP1E9sTz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AAIAAgIAAAACAgACAAICAwMDAwNzApsrw//vwoKCkgICA/wAAAP8A //8AAAD//wD/AP//////AAAAgAAAAIAAgIAAAACAgACAAICAwMDAwNzApsrw//vwoKCkgICA/wAA AP8A//8AAAD//wD/AP//////AAAAgAAAAIAAgIAAAACAgACAAICAwMDAwNzApsrw//vwoKCkgICA /wAAAP8A//8AAAD//wD/AP//////AAAAgAAAAIAAgIAAAACAgACAAICAwMDAwNzApsrw//vwoKCk gICA/wAAAP8A//8AAAD//wD/AP//////AAAAgAAAAIAAgIAAAACAgACAAICAwMDAwNzApsrw//vw oKCkgICA/wAAAP8A//8AAAD//wD/AP//////AAAAgAAAAIAAgIAAAACAgACAAICAwMDAwNzApsrw //vwoKCkgICA/wAAAP8A//8AAAD//wD/AP//////AAAAgAAAAIAAgIAAAACAgACAAICAwMDAwNzA psrw//vwoKCkgICA/wAAAP8A//8AAAD//wD/AP//////AAAAgAAAAIAAgIAAAACAgACAAICAwMDA wNzApsrw//vwoKCkgICA/wAAAP8A//8AAAD//wD/AP//////AAAAgAAAAIAAgIAAAACAgACAAICA wMDAwNzApsrw//vwoKCkgICA/wAAAP8A//8AAAD//wD/AP//////AAAAgAAAAIAAgIAAAACAgACA AICAwMDAwNzApsrw//vwoKCkgICA/wAAAP8A//8AAAD//wD/AP//////AAAAgAAAAIAAgIAAAACA gACA//vwoKCkgICA/wAAAP8A//8AAAD//wD/AP////// --0__=pQJFBByXqzan73O8nbCZfsZ8Yqf26DdBkfzEro5oQQukAX4p7Krwmumn--