Matchpathcon patch to print <<none>> when it gets enoent.
Subject: [PATCH] refpolicy: nsalibselinux_utils_matchpathcon.c changes --text follows this line--
utils/matchpathcon.c +7 -3
@@ -22,9 +22,13 @@char *buf;int rc =matchpathcon (path, mode, &buf);if (rc <0 ) { -fprintf (stderr,"matchpathcon(%s) failed: %s\n" , path, -strerror (errno)); -return 1 ; +if (errno ==ENOENT ) { + buf=strdup ("<<none>>" ); + }else { +fprintf (stderr,"matchpathcon(%s) failed: %s\n" , path, +strerror (errno)); +return 1 ; + } }if (header)printf ("%s\t%s\n" , path, buf);
Quoted 1 line · Daniel J Walsh
Merged in libselinux-2.0.87
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.