PERFORCE change 21015 for review

Brian Feldman green at freebsd.org
Tue Nov 12 23:46:27 GMT 2002


http://perforce.freebsd.org/chv.cgi?CH=21015

Change 21015 by green at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list