* lib/protoypes.h, libmisc/copydir.c, src/useradd.c:

selinux_file_context renamed set_selinux_file_context.
	* lib/protoypes.h, libmisc/copydir.c, src/useradd.c:
	Added reset_selinux_file_context.
	* src/useradd.c: Check the return value of
	set_selinux_file_context and reset_selinux_file_context.
	* libmisc/copydir.c: Check the return value of
	reset_selinux_file_context.
This commit is contained in:
nekral-guest
2010-08-28 19:58:00 +00:00
parent 991ce97170
commit 1d336d3a1e
4 changed files with 63 additions and 18 deletions

View File

@ -1764,7 +1764,9 @@ static void create_home (void)
{
if (access (user_home, F_OK) != 0) {
#ifdef WITH_SELINUX
selinux_file_context (user_home);
if (set_selinux_file_context (user_home) != 0) {
fail_exit (E_HOMEDIR);
}
#endif
/* XXX - create missing parent directories. --marekm */
if (mkdir (user_home, 0) != 0) {
@ -1791,7 +1793,9 @@ static void create_home (void)
#endif
#ifdef WITH_SELINUX
/* Reset SELinux to create files with default contexts */
setfscreatecon (NULL);
if (reset_selinux_file_context () != 0) {
fail_exit (E_HOMEDIR);
}
#endif
}
}