From nobody@FreeBSD.org  Wed Dec 22 05:54:10 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1EC2716A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Dec 2004 05:54:10 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id DE12D43D39
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Dec 2004 05:54:09 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBM5s9K1099457
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Dec 2004 05:54:09 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id iBM5s9pw099456;
	Wed, 22 Dec 2004 05:54:09 GMT
	(envelope-from nobody)
Message-Id: <200412220554.iBM5s9pw099456@www.freebsd.org>
Date: Wed, 22 Dec 2004 05:54:09 GMT
From: Alexander Melkov <melkov@comptek.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: can not open("..") from top-level directory of UFS2 hdd mounted within UFS hdd
X-Send-Pr-Version: www-2.3

>Number:         75380
>Category:       kern
>Synopsis:       can not open("..") from top-level directory of UFS2 hdd mounted within UFS hdd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gavin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 22 06:00:51 GMT 2004
>Closed-Date:    Wed Jan 30 18:06:05 UTC 2008
>Last-Modified:  Wed Jan 30 18:06:05 UTC 2008
>Originator:     Alexander Melkov
>Release:        5.3
>Organization:
>Environment:
FreeBSD melkov.ru 5.3-RELEASE FreeBSD 5.3-RELEASE #1: Tue Nov  9 14:59:22 MSK 2004     spamtrap@melkov.ru:/usr/obj/usr/src/sys/MELKOV  i386
>Description:
ufs2 hdd mounted in a directory of ufs hdd, say
/CCC is my ufs hdd, /CCC/DDD is the ufs2 hdd.
/CCC/DDD is owned by nobody:nobody mode 755.
from within /CCC/DDD directory, 'hd ..' works for users nobody and root, yet it doesn't work for other users such as ftp (says 'hd: ..: Permission denied').
This error actually makes tools like 'find' or 'ls -R' to fail.

I have 4 IDE hard disk drives on the system. 3 of them have ufs filesystem, the fourth has ufs2 filesystem.
/dev/ad0s1a  /
/dev/ad0s1e  /usr
/dev/ad0s1d  /var
/dev/ad0s1f  /home
/dev/ad0s1g  /usr/AAA
/dev/ad1s1e  /usr/AAA/BBB/CCC
/dev/ad2s1e  /usr/AAA/BBB/CCC/hdd3  <- hd .. works just fine here
/dev/ad3s1e  /usr/AAA/BBB/CCC/hdd4  <- this one is ufs2

*** kernel configuration ***
diff GENERIC MELKOV
22,23c22,23
< cpu           I486_CPU
< cpu           I586_CPU
---
> #cpu          I486_CPU
> #cpu          I586_CPU
25c25,27
< ident         GENERIC
---
> ident         MELKOV
>
> options               CPU_ENABLE_SSE          # Just for a case. They say this is default
41a44
> options               NTFS
272a276,298
>
> #options         IPFW2
> options         IPFIREWALL              #firewall
> #options      PFIL_HOOKS              #????
> options         IPFIREWALL_VERBOSE      #enable logging to syslogd(8)
> options         IPFIREWALL_FORWARD      #enable transparent proxy support
> options         IPFIREWALL_VERBOSE_LIMIT=10000    #limit verbosity
> #options         IPFIREWALL_DEFAULT_TO_ACCEPT    #allow everything by default
> options       IPDIVERT                #divert
> options         DUMMYNET
>
> options         TCP_DROP_SYNFIN         #drop TCP packets with SYN+FIN
>
> options         IPSEC                   #IP security
> ## ESP makes vpnc to fail
> #options         IPSEC_ESP               #IP security (crypto; define w/ IPSEC)
>
> options       NETSMB                  #SMB/CIFS requester
> options       NETSMBCRYPTO            #encrypted password support for SMB
> options       SMBFS                   #SMB/CIFS filesystem
> options       LIBICONV
> options       LIBMCHAIN               #mbuf management library
> options               NMBCLUSTERS=32768       #kern.ipc.nmbclusters

>How-To-Repeat:
create similar configuration (mount ufs2 hdd from within ufs), set up access rights as described above, run 'hd ..' as some other user from the top of ufs2.

>Fix:
      
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: gavin 
State-Changed-When: Tue Jan 29 17:21:30 UTC 2008 
State-Changed-Why:  
To submitter:  Are you able to recreate this problem on newer versions 
of FreeBSD? 


Responsible-Changed-From-To: freebsd-bugs->gavin 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Tue Jan 29 17:21:30 UTC 2008 
Responsible-Changed-Why:  
Track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75380 

From: "Alexander Melkov" <melkov@comptek.ru>
To: <bug-followup@FreeBSD.org>, <melkov@comptek.ru>
Cc:  
Subject: Re: kern/75380: can not open("..") from top-level directory of UFS2 hdd mounted within UFS hdd
Date: Wed, 30 Jan 2008 17:26:03 +0300

 Unfortunately I don't have any more ufs slices.
 This PR can be closed until someone reopens it if problem still exists.
State-Changed-From-To: feedback->closed 
State-Changed-By: gavin 
State-Changed-When: Wed Jan 30 17:58:29 UTC 2008 
State-Changed-Why:  
Submitter is no longer able to test for this and is happy for it to be 
closed.  In addition, I've tested it, and it no longer fails for me on 
6.3-RELEASE: 

# mdconfig -a -t swap -s 1m -u 10 ; newfs -O 1 /dev/md10 
# mdconfig -a -t swap -s 1m -u 11 ; newfs -O 2 /dev/md11 
# mkdir /ccc ; mount /dev/md10 /ccc 
# mkdir /ccc/ddd ; chown nobody:nobody /ccc/ddd ; chmod 755 /ccc/ddd 
# mount /dev/md11 /ccc/ddd 
# cd /ccc/ddd 
# hd .. 
[works] 

Then, as normal user: 

% cd /ccc/ddd 
% hd .. 
[works] 

So close this PR.  If somebody else can recreate it, we can reopen it. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=75380 
>Unformatted:
