- Allow semanage_genhomedircon to work with out a USER int homedir.template
This commit is contained in:
parent
90bffa9795
commit
e3e8d634bb
@ -1,18 +1,60 @@
|
|||||||
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libsemanage-2.0.11/src/genhomedircon.c
|
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libsemanage-2.0.14/src/genhomedircon.c
|
||||||
--- nsalibsemanage/src/genhomedircon.c 2007-10-01 09:54:35.000000000 -0400
|
--- nsalibsemanage/src/genhomedircon.c 2007-10-05 13:09:53.000000000 -0400
|
||||||
+++ libsemanage-2.0.11/src/genhomedircon.c 2007-10-01 12:24:39.000000000 -0400
|
+++ libsemanage-2.0.14/src/genhomedircon.c 2007-11-29 12:31:13.000000000 -0500
|
||||||
@@ -668,12 +668,11 @@
|
@@ -790,7 +790,7 @@
|
||||||
|
homedir_context_tpl = make_template(s, &HOME_DIR_PRED);
|
||||||
|
homeroot_context_tpl = make_template(s, &HOME_ROOT_PRED);
|
||||||
|
user_context_tpl = make_template(s, &USER_CONTEXT_PRED);
|
||||||
|
- if (!homedir_context_tpl || !homeroot_context_tpl || !user_context_tpl) {
|
||||||
|
+ if (!homedir_context_tpl || !homeroot_context_tpl) {
|
||||||
|
retval = STATUS_ERR;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
@@ -828,16 +828,18 @@
|
||||||
|
|
||||||
for (i = 0; i < nseusers; i++) {
|
ustr_sc_free(&temp);
|
||||||
seuname = semanage_seuser_get_sename(seuser_list[i]);
|
}
|
||||||
+ name = semanage_seuser_get_name(seuser_list[i]);
|
- if (write_user_context(s, out, user_context_tpl,
|
||||||
|
- ".*", s->fallback_user,
|
||||||
|
- s->fallback_user_prefix) != STATUS_SUCCESS) {
|
||||||
|
- retval = STATUS_ERR;
|
||||||
|
- goto done;
|
||||||
|
- }
|
||||||
|
+ if (user_context_tpl) {
|
||||||
|
+ if (write_user_context(s, out, user_context_tpl,
|
||||||
|
+ ".*", s->fallback_user,
|
||||||
|
+ s->fallback_user_prefix) != STATUS_SUCCESS) {
|
||||||
|
+ retval = STATUS_ERR;
|
||||||
|
+ goto done;
|
||||||
|
+ }
|
||||||
|
|
||||||
- if (strcmp(seuname, s->fallback_user) == 0)
|
- if (write_gen_home_dir_context(s, out, user_context_tpl,
|
||||||
+ if (strcmp(name,"root") && strcmp(seuname, s->fallback_user) == 0)
|
- homedir_context_tpl) != STATUS_SUCCESS) {
|
||||||
continue;
|
- retval = STATUS_ERR;
|
||||||
|
+ if (write_gen_home_dir_context(s, out, user_context_tpl,
|
||||||
|
+ homedir_context_tpl) != STATUS_SUCCESS) {
|
||||||
|
+ retval = STATUS_ERR;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
- name = semanage_seuser_get_name(seuser_list[i]);
|
done:
|
||||||
-
|
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/handle.c libsemanage-2.0.14/src/handle.c
|
||||||
if (strcmp(name, DEFAULT_LOGIN) == 0)
|
--- nsalibsemanage/src/handle.c 2007-08-20 19:15:37.000000000 -0400
|
||||||
continue;
|
+++ libsemanage-2.0.14/src/handle.c 2007-11-10 06:21:33.000000000 -0500
|
||||||
|
@@ -27,6 +27,7 @@
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
#include "direct_api.h"
|
||||||
|
@@ -131,7 +132,7 @@
|
||||||
|
|
||||||
|
/* This just sets the storename to what the user requests, no
|
||||||
|
verification of existance will be done until connect */
|
||||||
|
- sh->conf->store_path = storename;
|
||||||
|
+ sh->conf->store_path = strdup(storename);
|
||||||
|
sh->conf->store_type = storetype;
|
||||||
|
|
||||||
|
return;
|
||||||
|
@ -3,10 +3,11 @@
|
|||||||
Summary: SELinux binary policy manipulation library
|
Summary: SELinux binary policy manipulation library
|
||||||
Name: libsemanage
|
Name: libsemanage
|
||||||
Version: 2.0.14
|
Version: 2.0.14
|
||||||
Release: 1%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: http://www.nsa.gov/selinux/archives/libsemanage-%{version}.tgz
|
Source: http://www.nsa.gov/selinux/archives/libsemanage-%{version}.tgz
|
||||||
|
Patch: libsemanage-rhat.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: libselinux-devel >= %{libselinuxver} swig ustr-devel
|
BuildRequires: libselinux-devel >= %{libselinuxver} swig ustr-devel
|
||||||
@ -40,6 +41,7 @@ needed for developing applications that manipulate binary policies.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch -p1 -b .rhat
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make clean
|
make clean
|
||||||
@ -76,6 +78,12 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 29 2007 Dan Walsh <dwalsh@redhat.com> - 2.0.14-3
|
||||||
|
- Allow semanage_genhomedircon to work with out a USER int homedir.template
|
||||||
|
|
||||||
|
* Sat Nov 10 2007 Dan Walsh <dwalsh@redhat.com> - 2.0.14-2
|
||||||
|
- Fix semanage_select_store to allocate memory, fixes crash on invalid store
|
||||||
|
|
||||||
* Tue Nov 6 2007 Dan Walsh <dwalsh@redhat.com> - 2.0.14-1
|
* Tue Nov 6 2007 Dan Walsh <dwalsh@redhat.com> - 2.0.14-1
|
||||||
- Upgrade to latest from NSA
|
- Upgrade to latest from NSA
|
||||||
* Call rmdir() rather than remove() on directory removal so that errno isn't polluted from Stephen Smalley.
|
* Call rmdir() rather than remove() on directory removal so that errno isn't polluted from Stephen Smalley.
|
||||||
|
Loading…
Reference in New Issue
Block a user