- Fix handling of /etc/shells so genhomedircon will work

This commit is contained in:
Daniel J Walsh 2007-12-03 19:22:33 +00:00
parent e3e8d634bb
commit 3d2cf39af1
2 changed files with 15 additions and 4 deletions

View File

@ -1,7 +1,15 @@
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libsemanage-2.0.14/src/genhomedircon.c
--- nsalibsemanage/src/genhomedircon.c 2007-10-05 13:09:53.000000000 -0400
+++ libsemanage-2.0.14/src/genhomedircon.c 2007-11-29 12:31:13.000000000 -0500
@@ -790,7 +790,7 @@
+++ libsemanage-2.0.14/src/genhomedircon.c 2007-12-03 14:20:34.000000000 -0500
@@ -135,6 +135,7 @@
if (!shells)
return default_shell_list();
while (getline(&temp, &buff_len, shells) >= 0) {
+ temp[strlen(temp)-1]=0;
if (strcmp(temp, PATH_NOLOGIN_SHELL)) {
if (semanage_list_push(&list, temp)) {
free(temp);
@@ -790,7 +791,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);
@ -10,7 +18,7 @@ diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libseman
retval = STATUS_ERR;
goto done;
}
@@ -828,16 +828,18 @@
@@ -828,16 +829,18 @@
ustr_sc_free(&temp);
}

View File

@ -3,7 +3,7 @@
Summary: SELinux binary policy manipulation library
Name: libsemanage
Version: 2.0.14
Release: 3%{?dist}
Release: 4%{?dist}
License: GPL
Group: System Environment/Libraries
Source: http://www.nsa.gov/selinux/archives/libsemanage-%{version}.tgz
@ -78,6 +78,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man3/*
%changelog
* Mon Dec 3 2007 Dan Walsh <dwalsh@redhat.com> - 2.0.14-4
- Fix handling of /etc/shells so genhomedircon will work
* 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