Do not fail on missing SELinux User Record when adding login record
This commit is contained in:
parent
a7e3a97407
commit
2a9c9b49a7
@ -199,10 +199,10 @@ index 57ef49f..4b040c3 100644
|
||||
return retval;
|
||||
}
|
||||
diff --git a/libsemanage/src/seuser_record.c b/libsemanage/src/seuser_record.c
|
||||
index 8823b1e..d92633e 100644
|
||||
index 8823b1e..cfcd039 100644
|
||||
--- a/libsemanage/src/seuser_record.c
|
||||
+++ b/libsemanage/src/seuser_record.c
|
||||
@@ -140,19 +140,50 @@ const char *semanage_seuser_get_sename(const semanage_seuser_t * seuser)
|
||||
@@ -140,19 +140,46 @@ const char *semanage_seuser_get_sename(const semanage_seuser_t * seuser)
|
||||
|
||||
hidden_def(semanage_seuser_get_sename)
|
||||
|
||||
@ -234,15 +234,11 @@ index 8823b1e..d92633e 100644
|
||||
+ semanage_user_key_free(key);
|
||||
+ if (rc == STATUS_ERR)
|
||||
+ goto err;
|
||||
+ else if (rc == STATUS_NODATA) {
|
||||
+ ERR(handle, "SELinux user %s does not exist", sename);
|
||||
+ errno = EINVAL;
|
||||
+ rc = STATUS_ERR;
|
||||
+ goto err;
|
||||
+ else if (rc == STATUS_SUCCESS) {
|
||||
+ mls_range = semanage_user_get_mlsrange(u);
|
||||
+ semanage_seuser_set_mlsrange(handle, seuser, mls_range);
|
||||
+ semanage_user_free(u);
|
||||
+ }
|
||||
+ mls_range = semanage_user_get_mlsrange(u);
|
||||
+ semanage_seuser_set_mlsrange(handle, seuser, mls_range);
|
||||
+ semanage_user_free(u);
|
||||
+ }
|
||||
free(seuser->sename);
|
||||
seuser->sename = tmp_sename;
|
||||
|
@ -7,7 +7,7 @@
|
||||
Summary: SELinux binary policy manipulation library
|
||||
Name: libsemanage
|
||||
Version: 2.1.10
|
||||
Release: 11%{?dist}
|
||||
Release: 12%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
Source: libsemanage-%{version}.tgz
|
||||
@ -179,6 +179,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%endif # if with_python3
|
||||
|
||||
%changelog
|
||||
* Wed Sep 25 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.10-12
|
||||
- Do not fail on missing SELinux User Record when adding login record
|
||||
|
||||
* Mon Sep 23 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.10-11
|
||||
- Add msg to audit records
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user