rpms/busybox/devel busybox-1.2.2-id_ps.patch, NONE, 1.1 busybox.spec, 1.51, 1.52 busybox-1.2.0-id_ps.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Jan 22 10:14:20 UTC 2007
- Previous message (by thread): rpms/pcre/FC-6 .cvsignore, 1.8, 1.9 pcre.spec, 1.19, 1.20 sources, 1.8, 1.9
- Next message (by thread): rpms/pcre/devel pcre.spec,1.20,1.21 sources,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: varekova
Update of /cvs/dist/rpms/busybox/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv25333
Modified Files:
busybox.spec
Added Files:
busybox-1.2.2-id_ps.patch
Removed Files:
busybox-1.2.0-id_ps.patch
Log Message:
- Resolves: 223620
id output shows context twice
busybox-1.2.2-id_ps.patch:
coreutils/id.c | 36 +++++++++++++++++++++++++++++-------
procps/ps.c | 4 ++--
2 files changed, 31 insertions(+), 9 deletions(-)
--- NEW FILE busybox-1.2.2-id_ps.patch ---
--- busybox-1.2.2/procps/ps.c.id_ps 2006-07-01 00:42:12.000000000 +0200
+++ busybox-1.2.2/procps/ps.c 2007-01-22 10:43:51.000000000 +0100
@@ -44,11 +44,11 @@
#if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX
/* handle arguments */
#if ENABLE_FEATURE_PS_WIDE && ENABLE_SELINUX
- i = bb_getopt_ulflags(argc, argv, "wc", &w_count);
+ i = bb_getopt_ulflags(argc, argv, "wZ", &w_count);
#elif ENABLE_FEATURE_PS_WIDE && !ENABLE_SELINUX
bb_getopt_ulflags(argc, argv, "w", &w_count);
#else /* !ENABLE_FEATURE_PS_WIDE && ENABLE_SELINUX */
- i = bb_getopt_ulflags(argc, argv, "c");
+ i = bb_getopt_ulflags(argc, argv, "Z");
#endif
#if ENABLE_FEATURE_PS_WIDE
/* if w is given once, GNU ps sets the width to 132,
--- busybox-1.2.2/coreutils/id.c.id_ps 2006-07-01 00:42:07.000000000 +0200
+++ busybox-1.2.2/coreutils/id.c 2007-01-22 10:57:45.000000000 +0100
@@ -26,6 +26,7 @@
#define NAME_NOT_NUMBER 2
#define JUST_USER 4
#define JUST_GROUP 8
+#define JUST_CONTEXT 16
static short printf_full(unsigned int id, const char *arg, const char prefix)
{
@@ -50,9 +51,17 @@
/* Don't allow -n -r -nr -ug -rug -nug -rnug */
/* Don't allow more than one username */
- bb_opt_complementally = "?1:?:u--g:g--u:r?ug:n?ug";
+#ifdef CONFIG_SELINUX
+ /* Don't allow -gZ, -uZ or -nZ */
+ bb_opt_complementally = "?1:?:u--g:g--u:g--Z:Z--g:u--Z:Z--u:Z--n:n--Z:r?ug:n?ug";
+#else
+ bb_opt_complementally = "?1:?:u--g:g--u:r?ug:n?ug:";
+#endif
+#ifdef CONFIG_SELINUX
+ flags = bb_getopt_ulflags(argc, argv, "rnugZ");
+#else
flags = bb_getopt_ulflags(argc, argv, "rnug");
-
+#endif
/* This values could be overwritten later */
uid = geteuid();
gid = getegid();
@@ -81,12 +90,20 @@
bb_fflush_stdout_and_exit(EXIT_SUCCESS);
}
+#ifndef CONFIG_SELINUX
+ if ((flags & JUST_CONTEXT) & (is_selinux_enabled())) {
+ flags -= JUST_CONTEXT;
+ }
+#endif
+
/* Print full info like GNU id */
/* bb_getpwuid doesn't exit on failure here */
- status=printf_full(uid, bb_getpwuid(NULL, uid, 0), 'u');
- putchar(' ');
- /* bb_getgrgid doesn't exit on failure here */
- status|=printf_full(gid, bb_getgrgid(NULL, gid, 0), 'g');
+ if (!(flags & JUST_CONTEXT)) {
+ status=printf_full(uid, bb_getpwuid(NULL, uid, 0), 'u');
+ putchar(' ');
+ /* bb_getgrgid doesn't exit on failure here */
+ status|=printf_full(gid, bb_getgrgid(NULL, gid, 0), 'g');
+ }
#ifdef CONFIG_SELINUX
if ( is_selinux_enabled() ) {
@@ -103,7 +120,12 @@
}else{
safe_strncpy(context, "unknown",8);
}
- bb_printf(" context=%s", context);
+ if (flags & JUST_CONTEXT) {
+ bb_printf("%s", context);
+ }
+ else {
+ bb_printf(" context=%s", context);
+ }
}
#endif
Index: busybox.spec
===================================================================
RCS file: /cvs/dist/rpms/busybox/devel/busybox.spec,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- busybox.spec 11 Dec 2006 11:36:25 -0000 1.51
+++ busybox.spec 22 Jan 2007 10:14:18 -0000 1.52
@@ -1,7 +1,7 @@
Summary: Statically linked binary providing simplified versions of system commands
Name: busybox
Version: 1.2.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Epoch: 1
License: GPL
Group: System Environment/Shells
@@ -11,7 +11,7 @@
Patch2: busybox-1.2.0-selinux.patch
Patch4: busybox-1.2.0-ppc64.patch
Patch5: busybox-1.2.0-page_size.patch
-Patch7: busybox-1.2.0-id_ps.patch
+Patch7: busybox-1.2.2-id_ps.patch
Patch8: busybox-1.2.0-gcc41.patch
Patch9: busybox-1.2.0-tar.patch
Patch10: busybox-1.2.2-ash.patch
@@ -88,6 +88,10 @@
/sbin/busybox.anaconda
%changelog
+* Mon Jan 22 2007 Ivana Varekova <varekova at redhat.com> - 1:1.2.2-3
+- Resolves: 223620
+ id output shows context twice
+
* Mon Dec 10 2006 Ivana Varekova <varekova at redhat.com> - 1:1.2.2-2
- enable ash
--- busybox-1.2.0-id_ps.patch DELETED ---
- Previous message (by thread): rpms/pcre/FC-6 .cvsignore, 1.8, 1.9 pcre.spec, 1.19, 1.20 sources, 1.8, 1.9
- Next message (by thread): rpms/pcre/devel pcre.spec,1.20,1.21 sources,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list