From 5f8636d1e977bcbda5ab883a05ad37a57cac5540 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 15 Jan 2007 21:30:17 +0000 Subject: [PATCH] - Add Ulrich NSCD__GETSERV and NSCD__SHMEMGRP for Uli --- libselinux-rhat.patch | 166 +++++++++++++++++++++++++++++++++--------- libselinux.spec | 6 +- 2 files changed, 136 insertions(+), 36 deletions(-) diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index f78d0bb..72f2638 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1,6 +1,18 @@ +diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/av_permissions.h libselinux-1.33.4/include/selinux/av_permissions.h +--- nsalibselinux/include/selinux/av_permissions.h 2006-11-16 17:15:18.000000000 -0500 ++++ libselinux-1.33.4/include/selinux/av_permissions.h 2007-01-15 16:23:44.000000000 -0500 +@@ -837,6 +837,8 @@ + #define NSCD__SHMEMPWD 0x00000020UL + #define NSCD__SHMEMGRP 0x00000040UL + #define NSCD__SHMEMHOST 0x00000080UL ++#define NSCD__GETSERV 0x00000100UL ++#define NSCD__SHMEMGRP 0x00000200UL + #define ASSOCIATION__SENDTO 0x00000001UL + #define ASSOCIATION__RECVFROM 0x00000002UL + #define ASSOCIATION__SETCONTEXT 0x00000004UL diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/avc_add_callback.3 libselinux-1.33.4/man/man3/avc_add_callback.3 --- nsalibselinux/man/man3/avc_add_callback.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/avc_add_callback.3 2007-01-12 10:52:13.000000000 -0500 ++++ libselinux-1.33.4/man/man3/avc_add_callback.3 2007-01-15 16:21:55.000000000 -0500 @@ -3,7 +3,7 @@ .\" Author: Eamon Walsh (ewalsh@epoch.ncsc.mil) 2004 .TH "avc_add_callback" "3" "9 June 2004" "" "SE Linux API documentation" @@ -17,7 +29,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/avc_add_callback.3 l +.BR selinux (8) diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/avc_cache_stats.3 libselinux-1.33.4/man/man3/avc_cache_stats.3 --- nsalibselinux/man/man3/avc_cache_stats.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/avc_cache_stats.3 2007-01-12 10:52:01.000000000 -0500 ++++ libselinux-1.33.4/man/man3/avc_cache_stats.3 2007-01-15 16:21:55.000000000 -0500 @@ -3,7 +3,7 @@ .\" Author: Eamon Walsh (ewalsh@epoch.ncsc.mil) 2004 .TH "avc_cache_stats" "3" "27 May 2004" "" "SE Linux API documentation" @@ -34,7 +46,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/avc_cache_stats.3 li +.BR selinux (8) diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/avc_context_to_sid.3 libselinux-1.33.4/man/man3/avc_context_to_sid.3 --- nsalibselinux/man/man3/avc_context_to_sid.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/avc_context_to_sid.3 2007-01-12 10:51:53.000000000 -0500 ++++ libselinux-1.33.4/man/man3/avc_context_to_sid.3 2007-01-15 16:21:55.000000000 -0500 @@ -3,7 +3,7 @@ .\" Author: Eamon Walsh (ewalsh@epoch.ncsc.mil) 2004 .TH "avc_context_to_sid" "3" "27 May 2004" "" "SE Linux API documentation" @@ -51,7 +63,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/avc_context_to_sid.3 +.BR selinux (8) diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/avc_has_perm.3 libselinux-1.33.4/man/man3/avc_has_perm.3 --- nsalibselinux/man/man3/avc_has_perm.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/avc_has_perm.3 2007-01-12 10:16:17.000000000 -0500 ++++ libselinux-1.33.4/man/man3/avc_has_perm.3 2007-01-15 16:21:55.000000000 -0500 @@ -152,3 +152,4 @@ .BR avc_cache_stats (3), .BR avc_add_callback (3), @@ -59,7 +71,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/avc_has_perm.3 libse +.BR selinux(8) diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/avc_init.3 libselinux-1.33.4/man/man3/avc_init.3 --- nsalibselinux/man/man3/avc_init.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/avc_init.3 2007-01-12 10:51:40.000000000 -0500 ++++ libselinux-1.33.4/man/man3/avc_init.3 2007-01-15 16:21:55.000000000 -0500 @@ -3,7 +3,7 @@ .\" Author: Eamon Walsh (ewalsh@epoch.ncsc.mil) 2004 .TH "avc_init" "3" "27 May 2004" "" "SE Linux API documentation" @@ -77,7 +89,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/avc_init.3 libselinu + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/context_new.3 libselinux-1.33.4/man/man3/context_new.3 --- nsalibselinux/man/man3/context_new.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/context_new.3 2007-01-12 10:15:43.000000000 -0500 ++++ libselinux-1.33.4/man/man3/context_new.3 2007-01-15 16:21:55.000000000 -0500 @@ -56,3 +56,6 @@ On success, zero is returned. On failure, -1 is returned and errno is set appropriately. @@ -87,7 +99,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/context_new.3 libsel + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/freecon.3 libselinux-1.33.4/man/man3/freecon.3 --- nsalibselinux/man/man3/freecon.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/freecon.3 2007-01-12 10:51:18.000000000 -0500 ++++ libselinux-1.33.4/man/man3/freecon.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "freecon" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -106,7 +118,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/freecon.3 libselinux + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getcon.3 libselinux-1.33.4/man/man3/getcon.3 --- nsalibselinux/man/man3/getcon.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/getcon.3 2007-01-12 10:51:12.000000000 -0500 ++++ libselinux-1.33.4/man/man3/getcon.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "getcon" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -123,7 +135,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getcon.3 libselinux- +.BR selinux "(8), " freecon "(3), " setexeccon "(3)" diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getexeccon.3 libselinux-1.33.4/man/man3/getexeccon.3 --- nsalibselinux/man/man3/getexeccon.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/getexeccon.3 2007-01-12 10:51:04.000000000 -0500 ++++ libselinux-1.33.4/man/man3/getexeccon.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "getexeccon" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -142,7 +154,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getexeccon.3 libseli diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getfilecon.3 libselinux-1.33.4/man/man3/getfilecon.3 --- nsalibselinux/man/man3/getfilecon.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/getfilecon.3 2007-01-12 10:50:59.000000000 -0500 ++++ libselinux-1.33.4/man/man3/getfilecon.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "getfilecon" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -159,7 +171,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getfilecon.3 libseli +.BR selinux "(8), " freecon "(3), " setfilecon "(3), " setfscreatecon "(3)" diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getfscreatecon.3 libselinux-1.33.4/man/man3/getfscreatecon.3 --- nsalibselinux/man/man3/getfscreatecon.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/getfscreatecon.3 2007-01-12 10:50:55.000000000 -0500 ++++ libselinux-1.33.4/man/man3/getfscreatecon.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "getfscreatecon" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -176,7 +188,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getfscreatecon.3 lib +.BR selinux "(8), " freecon "(3), " getcon "(3), " getexeccon "(3)" diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/get_ordered_context_list.3 libselinux-1.33.4/man/man3/get_ordered_context_list.3 --- nsalibselinux/man/man3/get_ordered_context_list.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/get_ordered_context_list.3 2007-01-12 10:50:48.000000000 -0500 ++++ libselinux-1.33.4/man/man3/get_ordered_context_list.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "get_ordered_context_list" "3" "1 January 2004" "russell@coker.com.au" "SE Linux" .SH "NAME" @@ -193,7 +205,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/get_ordered_context_ +.BR selinux "(8), " freeconary "(3), " freecon "(3), " security_compute_av "(3)", getseuserbyname"(3)" diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getseuserbyname.3 libselinux-1.33.4/man/man3/getseuserbyname.3 --- nsalibselinux/man/man3/getseuserbyname.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/getseuserbyname.3 2007-01-12 10:13:47.000000000 -0500 ++++ libselinux-1.33.4/man/man3/getseuserbyname.3 2007-01-15 16:21:55.000000000 -0500 @@ -23,3 +23,6 @@ The errors documented for the stat(2) system call are also applicable here. @@ -203,7 +215,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getseuserbyname.3 li + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/is_context_customizable.3 libselinux-1.33.4/man/man3/is_context_customizable.3 --- nsalibselinux/man/man3/is_context_customizable.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/is_context_customizable.3 2007-01-12 10:50:33.000000000 -0500 ++++ libselinux-1.33.4/man/man3/is_context_customizable.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "is_context_customizable" "3" "10 January 2005" "dwalsh@redhat.com" "SELinux API documentation" .SH "NAME" @@ -221,7 +233,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/is_context_customiza + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/is_selinux_enabled.3 libselinux-1.33.4/man/man3/is_selinux_enabled.3 --- nsalibselinux/man/man3/is_selinux_enabled.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/is_selinux_enabled.3 2007-01-12 10:50:24.000000000 -0500 ++++ libselinux-1.33.4/man/man3/is_selinux_enabled.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "is_selinux_enabled" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -240,7 +252,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/is_selinux_enabled.3 + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/matchmediacon.3 libselinux-1.33.4/man/man3/matchmediacon.3 --- nsalibselinux/man/man3/matchmediacon.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/matchmediacon.3 2007-01-12 10:50:18.000000000 -0500 ++++ libselinux-1.33.4/man/man3/matchmediacon.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "matchmediacon" "3" "15 November 2004" "dwalsh@redhat.com" "SE Linux API documentation" .SH "NAME" @@ -257,7 +269,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/matchmediacon.3 libs +.BR selinux "(8), " freecon "(3) diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/matchpathcon.3 libselinux-1.33.4/man/man3/matchpathcon.3 --- nsalibselinux/man/man3/matchpathcon.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/matchpathcon.3 2007-01-12 10:50:12.000000000 -0500 ++++ libselinux-1.33.4/man/man3/matchpathcon.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "matchpathcon" "3" "16 March 2005" "sds@tycho.nsa.gov" "SE Linux API documentation" .SH "NAME" @@ -274,7 +286,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/matchpathcon.3 libse +.BR selinux "(8), " freecon "(3), " setfilecon "(3), " setfscreatecon "(3)" diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_check_context.3 libselinux-1.33.4/man/man3/security_check_context.3 --- nsalibselinux/man/man3/security_check_context.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/security_check_context.3 2007-01-12 10:50:01.000000000 -0500 ++++ libselinux-1.33.4/man/man3/security_check_context.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "security_check_context" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -293,7 +305,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_check_conte + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_compute_av.3 libselinux-1.33.4/man/man3/security_compute_av.3 --- nsalibselinux/man/man3/security_compute_av.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/security_compute_av.3 2007-01-12 10:49:51.000000000 -0500 ++++ libselinux-1.33.4/man/man3/security_compute_av.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,7 +1,7 @@ .TH "security_compute_av" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -311,7 +323,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_compute_av. +.BR selinux "(8), " getcon "(3), " getfilecon "(3), " get_ordered_context_list "(3)" diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_getenforce.3 libselinux-1.33.4/man/man3/security_getenforce.3 --- nsalibselinux/man/man3/security_getenforce.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/security_getenforce.3 2007-01-12 10:49:38.000000000 -0500 ++++ libselinux-1.33.4/man/man3/security_getenforce.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "security_getenforce" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -330,7 +342,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_getenforce. + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_load_booleans.3 libselinux-1.33.4/man/man3/security_load_booleans.3 --- nsalibselinux/man/man3/security_load_booleans.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/security_load_booleans.3 2007-01-12 10:12:30.000000000 -0500 ++++ libselinux-1.33.4/man/man3/security_load_booleans.3 2007-01-15 16:21:55.000000000 -0500 @@ -56,4 +56,4 @@ This manual page was written by Dan Walsh . @@ -339,7 +351,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_load_boolea +selinux(8), getsebool(8), booleans(8), togglesebool(8) diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_load_policy.3 libselinux-1.33.4/man/man3/security_load_policy.3 --- nsalibselinux/man/man3/security_load_policy.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/security_load_policy.3 2007-01-12 10:49:30.000000000 -0500 ++++ libselinux-1.33.4/man/man3/security_load_policy.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "security_load_policy" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -358,7 +370,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_load_policy + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_policyvers.3 libselinux-1.33.4/man/man3/security_policyvers.3 --- nsalibselinux/man/man3/security_policyvers.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/security_policyvers.3 2007-01-12 10:49:22.000000000 -0500 ++++ libselinux-1.33.4/man/man3/security_policyvers.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "security_policyvers" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -377,7 +389,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_policyvers. + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_binary_policy_path.3 libselinux-1.33.4/man/man3/selinux_binary_policy_path.3 --- nsalibselinux/man/man3/selinux_binary_policy_path.3 2007-01-11 14:01:22.000000000 -0500 -+++ libselinux-1.33.4/man/man3/selinux_binary_policy_path.3 2007-01-12 10:49:16.000000000 -0500 ++++ libselinux-1.33.4/man/man3/selinux_binary_policy_path.3 2007-01-15 16:21:55.000000000 -0500 @@ -4,7 +4,7 @@ selinux_failsafe_context_path, selinux_removable_context_path, selinux_default_context_path, selinux_user_contexts_path, @@ -396,7 +408,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_binary_polic + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_check_securetty_context.3 libselinux-1.33.4/man/man3/selinux_check_securetty_context.3 --- nsalibselinux/man/man3/selinux_check_securetty_context.3 2007-01-11 14:01:22.000000000 -0500 -+++ libselinux-1.33.4/man/man3/selinux_check_securetty_context.3 2007-01-12 10:48:56.000000000 -0500 ++++ libselinux-1.33.4/man/man3/selinux_check_securetty_context.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "selinux_check_securetty_context" "3" "1 January 2007" "dwalsh@redhat.com" "SE Linux API documentation" .SH "NAME" @@ -415,7 +427,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_check_secure + diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_getenforcemode.3 libselinux-1.33.4/man/man3/selinux_getenforcemode.3 --- nsalibselinux/man/man3/selinux_getenforcemode.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/selinux_getenforcemode.3 2007-01-12 10:48:36.000000000 -0500 ++++ libselinux-1.33.4/man/man3/selinux_getenforcemode.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "selinux_getenforcemode" "3" "25 May 2004" "dwalsh@redhat.com" "SE Linux API documentation" .SH "NAME" @@ -434,7 +446,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_getenforcemo diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_policy_root.3 libselinux-1.33.4/man/man3/selinux_policy_root.3 --- nsalibselinux/man/man3/selinux_policy_root.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/selinux_policy_root.3 2007-01-12 10:11:54.000000000 -0500 ++++ libselinux-1.33.4/man/man3/selinux_policy_root.3 2007-01-15 16:21:55.000000000 -0500 @@ -14,4 +14,7 @@ On success, returns a directory path containing the SELinux policy files. On failure, NULL is returned. @@ -445,7 +457,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_policy_root. diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/setfilecon.3 libselinux-1.33.4/man/man3/setfilecon.3 --- nsalibselinux/man/man3/setfilecon.3 2006-11-16 17:15:30.000000000 -0500 -+++ libselinux-1.33.4/man/man3/setfilecon.3 2007-01-12 10:48:24.000000000 -0500 ++++ libselinux-1.33.4/man/man3/setfilecon.3 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "setfilecon" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -462,7 +474,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/setfilecon.3 libseli +.BR selinux "(3), " freecon "(3), " getfilecon "(3), " setfscreatecon "(3)" diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/avcstat.8 libselinux-1.33.4/man/man8/avcstat.8 --- nsalibselinux/man/man8/avcstat.8 2006-11-16 17:15:26.000000000 -0500 -+++ libselinux-1.33.4/man/man8/avcstat.8 2007-01-12 10:09:24.000000000 -0500 ++++ libselinux-1.33.4/man/man8/avcstat.8 2007-01-15 16:21:55.000000000 -0500 @@ -22,6 +22,9 @@ .B \-f Specifies the location of the AVC statistics file, defaulting to '/selinux/avc/cache_stats'. @@ -475,7 +487,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/avcstat.8 libselinux The program was written by James Morris . diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/getenforce.8 libselinux-1.33.4/man/man8/getenforce.8 --- nsalibselinux/man/man8/getenforce.8 2006-11-16 17:15:26.000000000 -0500 -+++ libselinux-1.33.4/man/man8/getenforce.8 2007-01-12 10:07:11.000000000 -0500 ++++ libselinux-1.33.4/man/man8/getenforce.8 2007-01-15 16:21:55.000000000 -0500 @@ -12,4 +12,4 @@ Dan Walsh, @@ -484,7 +496,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/getenforce.8 libseli +selinux(8), setenforce(8), selinuxenabled(8) diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/getsebool.8 libselinux-1.33.4/man/man8/getsebool.8 --- nsalibselinux/man/man8/getsebool.8 2006-11-16 17:15:26.000000000 -0500 -+++ libselinux-1.33.4/man/man8/getsebool.8 2007-01-12 10:11:15.000000000 -0500 ++++ libselinux-1.33.4/man/man8/getsebool.8 2007-01-15 16:21:55.000000000 -0500 @@ -26,9 +26,10 @@ .B \-a Show all SELinux booleans. @@ -500,7 +512,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/getsebool.8 libselin -setsebool(8), booleans(8) diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/matchpathcon.8 libselinux-1.33.4/man/man8/matchpathcon.8 --- nsalibselinux/man/man8/matchpathcon.8 2006-11-16 17:15:26.000000000 -0500 -+++ libselinux-1.33.4/man/man8/matchpathcon.8 2007-01-12 10:47:15.000000000 -0500 ++++ libselinux-1.33.4/man/man8/matchpathcon.8 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "matchpathcon" "8" "21 April 2005" "dwalsh@redhat.com" "SE Linux Command Line documentation" .SH "NAME" @@ -517,7 +529,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/matchpathcon.8 libse .BR mathpathcon "(3), " diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxenabled.8 libselinux-1.33.4/man/man8/selinuxenabled.8 --- nsalibselinux/man/man8/selinuxenabled.8 2006-11-16 17:15:26.000000000 -0500 -+++ libselinux-1.33.4/man/man8/selinuxenabled.8 2007-01-12 10:07:35.000000000 -0500 ++++ libselinux-1.33.4/man/man8/selinuxenabled.8 2007-01-15 16:21:55.000000000 -0500 @@ -13,4 +13,4 @@ Dan Walsh, @@ -526,7 +538,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxenabled.8 lib +selinux(8), setenforce(8), getenforce(8) diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/setenforce.8 libselinux-1.33.4/man/man8/setenforce.8 --- nsalibselinux/man/man8/setenforce.8 2006-11-16 17:15:26.000000000 -0500 -+++ libselinux-1.33.4/man/man8/setenforce.8 2007-01-12 10:06:30.000000000 -0500 ++++ libselinux-1.33.4/man/man8/setenforce.8 2007-01-15 16:21:55.000000000 -0500 @@ -17,7 +17,7 @@ Dan Walsh, @@ -538,7 +550,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/setenforce.8 libseli /etc/grub.conf, /etc/selinux/config diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/togglesebool.8 libselinux-1.33.4/man/man8/togglesebool.8 --- nsalibselinux/man/man8/togglesebool.8 2006-11-16 17:15:26.000000000 -0500 -+++ libselinux-1.33.4/man/man8/togglesebool.8 2007-01-12 10:46:55.000000000 -0500 ++++ libselinux-1.33.4/man/man8/togglesebool.8 2007-01-15 16:21:55.000000000 -0500 @@ -1,6 +1,6 @@ .TH "togglesebool" "1" "26 Oct 2004" "sgrubb@redhat.com" "SELinux Command Line documentation" .SH "NAME" @@ -553,3 +565,87 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/togglesebool.8 libse .SH "SEE ALSO" -booleans(8), getsebool(8), setsebool(8) +selinux(8), booleans(8), getsebool(8), setsebool(8) +diff --exclude-from=exclude -N -u -r nsalibselinux/utils/getdefaultcon.c libselinux-1.33.4/utils/getdefaultcon.c +--- nsalibselinux/utils/getdefaultcon.c 1969-12-31 19:00:00.000000000 -0500 ++++ libselinux-1.33.4/utils/getdefaultcon.c 2007-01-15 16:21:55.000000000 -0500 +@@ -0,0 +1,80 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++void usage(char *name, char *detail, int rc) ++{ ++ fprintf(stderr, "usage: %s [-l level] user fromcon\n", name); ++ if (detail) ++ fprintf(stderr, "%s: %s\n", name, detail); ++ exit(rc); ++} ++ ++int main(int argc, char **argv) ++{ ++ security_context_t usercon = NULL, cur_context = NULL; ++ char *user = NULL, *level = NULL, *role=NULL, *seuser=NULL, *dlevel=NULL; ++ int ret, opt; ++ ++ while ((opt = getopt(argc, argv, "l:r:")) > 0) { ++ switch (opt) { ++ case 'l': ++ level = strdup(optarg); ++ break; ++ case 'r': ++ role = strdup(optarg); ++ break; ++ default: ++ usage(argv[0], "invalid option", 1); ++ } ++ } ++ ++ if (((argc - optind) < 1) || ((argc - optind) > 2)) ++ usage(argv[0], "invalid number of arguments", 2); ++ ++ /* If selinux isn't available, bail out. */ ++ if (!is_selinux_enabled()) { ++ fprintf(stderr, ++ "%s may be used only on a SELinux kernel.\n", argv[0]); ++ return 1; ++ } ++ ++ user = argv[optind]; ++ ++ /* If a context wasn't passed, use the current context. */ ++ if (((argc - optind) < 2)) { ++ if (getcon(&cur_context) < 0) { ++ fprintf(stderr, "Couldn't get current context.\n"); ++ return 2; ++ } ++ } else ++ cur_context = argv[optind + 1]; ++ ++ if (getseuserbyname(user, &seuser, &dlevel)==0) { ++ if (! level) level=dlevel; ++ if (role != NULL && role[0]) ++ ret=get_default_context_with_rolelevel(seuser, role, level,cur_context,&usercon); ++ else ++ ret=get_default_context_with_level(seuser, level, cur_context,&usercon); ++ } ++ if (ret < 0) ++ perror(argv[0]); ++ else ++ printf("%s: %s from %s %s %s %s -> %s\n", argv[0], user, cur_context, seuser, role, level, usercon); ++ ++ ++ free(role); ++ free(seuser); ++ if (level != dlevel) free(level); ++ free(dlevel); ++ free(usercon); ++ ++ return 0; ++} diff --git a/libselinux.spec b/libselinux.spec index 5ba0390..0e7c2fa 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -2,7 +2,7 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 1.33.4 -Release: 2%{?dist} +Release: 3%{?dist} License: Public domain (uncopyrighted) Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz @@ -71,6 +71,7 @@ rm -f %{buildroot}%{_sbindir}/deftype rm -f %{buildroot}%{_sbindir}/execcon rm -f %{buildroot}%{_sbindir}/getcon rm -f %{buildroot}%{_sbindir}/getconlist +rm -f %{buildroot}%{_sbindir}/getdefaultcon rm -f %{buildroot}%{_sbindir}/getenforcemode rm -f %{buildroot}%{_sbindir}/getfilecon rm -f %{buildroot}%{_sbindir}/getpidcon @@ -120,6 +121,9 @@ exit 0 %{_libdir}/python*/site-packages/selinux.py* %changelog +* Mon Jan 15 2007 Dan Walsh - 1.33.4-3 +- Add Ulrich NSCD__GETSERV and NSCD__SHMEMGRP for Uli + * Fri Jan 12 2007 Dan Walsh - 1.33.4-2 - Add reference to selinux man page in all man pages to make apropos work Resolves: # 217881