Date: Tue, 12 Nov 2002 12:28:25 -0800 (PST) From: Brian Feldman <green@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 21008 for review Message-ID: <200211122028.gACKSPMx014630@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=21008 Change 21008 by green@green_laptop_2 on 2002/11/12 12:27:37 Make ls(1) use correct logic for finding the path names for files to look up MAC labels for. Affected files ... .. //depot/projects/trustedbsd/mac/bin/ls/ls.c#20 edit Differences ... ==== //depot/projects/trustedbsd/mac/bin/ls/ls.c#20 (text+ko) ==== @@ -691,17 +691,15 @@ error = mac_prepare_file_label(&label); if (error == -1) { - warn("%s", cur->fts_name); + warn("MAC label for %s/%s", + cur->fts_parent->fts_path, + cur->fts_name); goto label_out; } - if (cur->fts_level == FTS_ROOTLEVEL) - snprintf(name, sizeof(name), - "%s", cur->fts_name); - else - snprintf(name, sizeof(name), - "%s/%s", cur->fts_parent->fts_accpath, - cur->fts_name); + snprintf(name, sizeof(name), "%s/%s", + cur->fts_parent->fts_accpath, + cur->fts_name); if (options & FTS_LOGICAL) error = mac_get_file(name, @@ -710,7 +708,9 @@ error = mac_get_link(name, label); if (error == -1) { - warn("%s", cur->fts_name); + warn("MAC label for %s/%s", + cur->fts_parent->fts_path, + cur->fts_name); mac_free(label); goto label_out; } @@ -718,7 +718,9 @@ error = mac_to_text(label, &labelstr); if (error == -1) { - warn("%s", cur->fts_name); + warn("MAC label for %s/%s", + cur->fts_parent->fts_path, + cur->fts_name); mac_free(label); goto label_out; } 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?200211122028.gACKSPMx014630>