Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2002 15:46:27 -0800 (PST)
From:      Brian Feldman <green@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 21015 for review
Message-ID:  <200211122346.gACNkRbb032273@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=21015

Change 21015 by green@green_laptop_2 on 2002/11/12 15:45:46

	Really correct the initial issue in ls(1): test for whether
	there is a parent directory without paying attention to any
	fields other than fts_parent and fts_name when attempting
	to find a MAC label for a given FTSENT.

Affected files ...

.. //depot/projects/trustedbsd/mac/bin/ls/ls.c#21 edit

Differences ...

==== //depot/projects/trustedbsd/mac/bin/ls/ls.c#21 (text+ko) ====

@@ -697,9 +697,13 @@
 						goto label_out;
 					}
 
-					snprintf(name, sizeof(name), "%s/%s",
-					    cur->fts_parent->fts_accpath,
-					    cur->fts_name);
+					if (cur->fts_parent == NULL)
+						snprintf(name, sizeof(name),
+						"%s", p->fts_name);
+					else
+						snprintf(name, sizeof(name),
+						    "%s/%s", cur->fts_parent->
+						    fts_accpath, cur->fts_name);
 
 					if (options & FTS_LOGICAL)
 						error = mac_get_file(name,

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211122346.gACNkRbb032273>