From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27250 invoked from network); 7 Aug 2000 18:05:01 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Aug 2000 18:05:01 -0000 Received: (qmail 28871 invoked by alias); 7 Aug 2000 18:04:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12559 Received: (qmail 28864 invoked from network); 7 Aug 2000 18:04:51 -0000 Date: Mon, 7 Aug 2000 14:04:45 -0400 From: Clint Adams To: Bart Schaefer Cc: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: tail-dropping in files module mkdir Message-ID: <20000807140445.A15891@dman.com> References: <20000804105323.B4820@dman.com> <1000804151753.ZM28846@candle.brasslantern.com> <20000804113220.A5135@dman.com> <1000804161026.ZM28907@candle.brasslantern.com> <20000804204021.A7925@dman.com> <1000804070216.ZM23696@candle.brasslantern.com> <20000804091955.A4368@dman.com> <000804111549.ZM28988@candle.brasslantern.com> <20000804205227.B7925@dman.com> <1000805044825.ZM29238@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i In-Reply-To: <1000805044825.ZM29238@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Sat, Aug 05, 2000 at 04:48:25AM +0000 > You misunderstand the problem. It isn't that we need the real path in > order to determine the value of pathmax, it's this sort of silliness: > > /usr/local/../bin/../doc/../etc/../include/../lib/../local/blahblahblah > > If the length of the "blahblahblah" part approaches pathmax, you get an > ENAMETOOLONG error even though you could chdir to each directory from > left to right and eventually reach a legitimate file. Computing the > realpath() in such a case won't change anything. Again I am confused. Does _PC_PATH_MAX have any significance for absolute paths? Can someone check POSIX? I'm now of the opinion that the zpathmax check should be removed from bin_mkdir, except for mkdir -p, in which case not only zpathmax should be checked, but also _PC_NAME_MAX for each path element, including the tail. > It would make sense that an absolute link from the root could be as long > as the longest path on the filesystem to which the link refers, no? Well, let's say you have a BIGFS mounted on on /usr, where the largest filename is 65,535 characters long. / is a SMALLFS, which has a maximum filename size of 255 characters, and the maximum size of the destination of a symlink is 1023 characters. Therefore, the absolute link from the root could not be as long as the longest path on the referent filesystem. Obversely, the BIGFS can probably handle symlinks to the root fs.