rpms/coreutils/devel coreutils-selinux.patch, 1.27, 1.28 coreutils.spec, 1.149, 1.150
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Nov 23 17:41:22 UTC 2006
Author: twaugh
Update of /cvs/dist/rpms/coreutils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv9207
Modified Files:
coreutils-selinux.patch coreutils.spec
Log Message:
* Thu Nov 23 2006 Tim Waugh <twaugh at redhat.com>
- Fixed stat's 'C' format specifier (bug #216676).
- Resolves: rhbz#216676
coreutils-selinux.patch:
README | 4
config.hin | 33 +---
configure.ac | 7
man/Makefile.am | 4
man/chcon.1 | 64 ++++++++
man/chcon.x | 4
man/cp.1 | 5
man/dir.1 | 14 +
man/id.1 | 3
man/install.1 | 5
man/ls.1 | 14 +
man/mkdir.1 | 2
man/mkfifo.1 | 3
man/mknod.1 | 3
man/runcon.1 | 45 +++++
man/runcon.x | 14 +
man/stat.1 | 6
man/vdir.1 | 14 +
src/Makefile.am | 23 +-
src/chcon.c | 421 +++++++++++++++++++++++++++++++++++++++++++++++++++++
src/copy.c | 73 +++++++++
src/copy.h | 4
src/cp.c | 67 ++++++++
src/id.c | 68 ++++++++
src/install.c | 99 ++++++++++++
src/ls.c | 296 ++++++++++++++++++++++++++++++++-----
src/mkdir.c | 30 +++
src/mkfifo.c | 29 +++
src/mknod.c | 30 +++
src/mv.c | 13 +
src/runcon.c | 253 +++++++++++++++++++++++++++++++
src/stat.c | 146 ++++++++++++++----
tests/help-version | 4
33 files changed, 1699 insertions(+), 101 deletions(-)
Index: coreutils-selinux.patch
===================================================================
RCS file: /cvs/dist/rpms/coreutils/devel/coreutils-selinux.patch,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- coreutils-selinux.patch 23 Nov 2006 17:08:14 -0000 1.27
+++ coreutils-selinux.patch 23 Nov 2006 17:41:19 -0000 1.28
@@ -1782,7 +1782,7 @@
+}
+#endif
--- coreutils-5.97/src/stat.c.selinux 2005-12-15 21:25:53.000000000 +0000
-+++ coreutils-5.97/src/stat.c 2006-11-17 13:56:55.000000000 +0000
++++ coreutils-5.97/src/stat.c 2006-11-23 17:33:50.000000000 +0000
@@ -42,6 +42,13 @@
# endif
#endif
@@ -1867,7 +1867,7 @@
break;
}
break;
-@@ -690,9 +706,17 @@
+@@ -690,9 +706,21 @@
/* Stat the file system and print what we find. */
static bool
@@ -1877,16 +1877,20 @@
STRUCT_STATVFS statfsbuf;
+ SECURITY_ID_T scontext = NULL;
+#ifdef WITH_SELINUX
-+ if(secure)
++ if(is_selinux_enabled()) {
+ if (getfilecon(filename,&scontext)<0) {
-+ perror (filename);
-+ return false;
++ if (secure) {
++ perror (filename);
++ return false;
++ }
++ scontext = NULL;
+ }
++ }
+#endif
if (STATFS (filename, &statfsbuf) != 0)
{
-@@ -703,25 +727,46 @@
+@@ -703,25 +731,46 @@
if (format == NULL)
{
@@ -1942,18 +1946,18 @@
if ((follow_links ? stat : lstat) (filename, &statbuf) != 0)
{
-@@ -729,11 +774,29 @@
+@@ -729,11 +778,29 @@
return false;
}
+#ifdef WITH_SELINUX
-+ if(secure) {
++ if(is_selinux_enabled()) {
+ int i;
+ if (!follow_links)
+ i=lgetfilecon(filename, &scontext);
+ else
+ i=getfilecon(filename, &scontext);
-+ if (i == -1)
++ if (i == -1 && secure)
+ {
+ perror (filename);
+ return false;
@@ -1973,7 +1977,7 @@
}
else
{
-@@ -751,16 +814,30 @@
+@@ -751,16 +818,30 @@
}
else
{
@@ -2011,7 +2015,7 @@
return true;
}
-@@ -777,6 +854,7 @@
+@@ -777,6 +858,7 @@
Display file or file system status.\n\
\n\
-L, --dereference follow links\n\
@@ -2019,7 +2023,7 @@
-f, --file-system display file system status instead of file status\n\
"), stdout);
fputs (_("\
-@@ -836,6 +914,7 @@
+@@ -836,6 +918,7 @@
%c Total file nodes in file system\n\
%d Free file nodes in file system\n\
%f Free blocks in file system\n\
@@ -2027,7 +2031,7 @@
"), stdout);
fputs (_("\
%i File System ID in hex\n\
-@@ -860,6 +939,7 @@
+@@ -860,6 +943,7 @@
bool follow_links = false;
bool fs = false;
bool terse = false;
@@ -2035,7 +2039,7 @@
char *format = NULL;
bool ok = true;
-@@ -871,7 +951,7 @@
+@@ -871,7 +955,7 @@
atexit (close_stdout);
@@ -2044,7 +2048,7 @@
{
switch (c)
{
-@@ -898,6 +978,14 @@
+@@ -898,6 +982,14 @@
case 't':
terse = true;
break;
@@ -2059,7 +2063,7 @@
case_GETOPT_HELP_CHAR;
-@@ -916,8 +1004,8 @@
+@@ -916,8 +1008,8 @@
for (i = optind; i < argc; i++)
ok &= (fs
Index: coreutils.spec
===================================================================
RCS file: /cvs/dist/rpms/coreutils/devel/coreutils.spec,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -r1.149 -r1.150
--- coreutils.spec 23 Nov 2006 17:08:14 -0000 1.149
+++ coreutils.spec 23 Nov 2006 17:41:19 -0000 1.150
@@ -286,6 +286,7 @@
%changelog
* Thu Nov 23 2006 Tim Waugh <twaugh at redhat.com>
+- Fixed stat's 'C' format specifier (bug #216676).
- Misleading 'id -Z root' error message (bug #211089).
* Fri Nov 10 2006 Tim Waugh <twaugh at redhat.com> 5.97-14
More information about the fedora-cvs-commits
mailing list