* Libsemanage genhomedircon to allow fallback users with no level
@ 2011-12-15 15:39 Daniel J Walsh
0 siblings, 0 replies; only message in thread
From: Daniel J Walsh @ 2011-12-15 15:39 UTC (permalink / raw)
To: SELinux
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
If you build a distribution without MLS turned on, libsemanage will
crash if given a user without a level. This patch allows users
without levels to be passed in.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk7qFMoACgkQrlYvE4MpobNIhwCbB/baCifURS4ldfZYo4eplezu
GwQAn0zyfeS4po8AK7zhJTtTjfUWWrKq
=oOTr
-----END PGP SIGNATURE-----
[-- Attachment #2: libsemanage-fallbackuser.patch --]
[-- Type: text/plain, Size: 805 bytes --]
diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c
index 847d87e..d2646ae 100644
--- a/libsemanage/src/genhomedircon.c
+++ b/libsemanage/src/genhomedircon.c
@@ -660,9 +717,12 @@ static int set_fallback_user(genhomedircon_settings_t *s, const char *user,
{
char *fallback_user = strdup(user);
char *fallback_user_prefix = strdup(prefix);
- char *fallback_user_level = strdup(level);
+ char *fallback_user_level = NULL;
+ if (level)
+ fallback_user_level = strdup(level);
- if (fallback_user == NULL || fallback_user_prefix == NULL || fallback_user_level == NULL) {
+ if (fallback_user == NULL || fallback_user_prefix == NULL ||
+ (fallback_user_level == NULL && level != NULL)) {
free(fallback_user);
free(fallback_user_prefix);
free(fallback_user_level);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-12-15 15:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-15 15:39 Libsemanage genhomedircon to allow fallback users with no level Daniel J Walsh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.