All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] libsemanage -- fallback-user-level
@ 2012-03-26 13:57 Laurent Bigonville
  2012-03-26 14:51 ` Russell Coker
  2012-03-27 14:14 ` Daniel J Walsh
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Bigonville @ 2012-03-26 13:57 UTC (permalink / raw)
  To: selinux

Hi,

I've no rational and no original author about this patch.


--- a/libsemanage/src/genhomedircon.c
+++ b/libsemanage/src/genhomedircon.c
@@ -863,7 +877,7 @@
 			level = semanage_user_get_mlslevel(*u);
 		} else {
 			prefix = name;
-			level = "s0";
+			level = FALLBACK_USER_LEVEL;
 		}
 
 		retval = getpwnam_r(name, &pwstorage, rbuf, rbuflen, &pwent);

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/4] libsemanage -- fallback-user-level
  2012-03-26 13:57 [PATCH 1/4] libsemanage -- fallback-user-level Laurent Bigonville
@ 2012-03-26 14:51 ` Russell Coker
  2012-03-27 14:14 ` Daniel J Walsh
  1 sibling, 0 replies; 3+ messages in thread
From: Russell Coker @ 2012-03-26 14:51 UTC (permalink / raw)
  To: Laurent Bigonville; +Cc: selinux

On Tue, 27 Mar 2012, Laurent Bigonville <bigon@debian.org> wrote:
> I've no rational and no original author about this patch.

That would be mine.  Having magic numbers in the code is a bad idea, using a 
macro is better.

> 
> --- a/libsemanage/src/genhomedircon.c
> +++ b/libsemanage/src/genhomedircon.c
> @@ -863,7 +877,7 @@
>  			level = semanage_user_get_mlslevel(*u);
>  		} else {
>  			prefix = name;
> -			level = "s0";
> +			level = FALLBACK_USER_LEVEL;
>  		}
> 
>  		retval = getpwnam_r(name, &pwstorage, rbuf, rbuflen, &pwent);
> 
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov
> with the words "unsubscribe selinux" without quotes as the message.


-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/4] libsemanage -- fallback-user-level
  2012-03-26 13:57 [PATCH 1/4] libsemanage -- fallback-user-level Laurent Bigonville
  2012-03-26 14:51 ` Russell Coker
@ 2012-03-27 14:14 ` Daniel J Walsh
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel J Walsh @ 2012-03-27 14:14 UTC (permalink / raw)
  To: Laurent Bigonville; +Cc: selinux

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/26/2012 09:57 AM, Laurent Bigonville wrote:
> Hi,
> 
> I've no rational and no original author about this patch.
> 
> 
> --- a/libsemanage/src/genhomedircon.c +++
> b/libsemanage/src/genhomedircon.c @@ -863,7 +877,7 @@ level =
> semanage_user_get_mlslevel(*u); } else { prefix = name; -			level =
> "s0"; +			level = FALLBACK_USER_LEVEL; }
> 
> retval = getpwnam_r(name, &pwstorage, rbuf, rbuflen, &pwent);
> 
> -- This message was distributed to subscribers of the selinux
> mailing list. If you no longer wish to subscribe, send mail to
> majordomo@tycho.nsa.gov with the words "unsubscribe selinux"
> without quotes as the message.
> 
> 
Looks good to me although I see this in two places.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9xyz8ACgkQrlYvE4MpobOV3QCfQfT77DP3b5sXDqmQ2vOoVVxl
wukAoL137DCkrpJF6ISEE63oa6z8Td2e
=EHIC
-----END PGP SIGNATURE-----

[-- Attachment #2: libsemanage_fallback.patch --]
[-- Type: text/x-patch, Size: 716 bytes --]

diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c
index d2646ae..1b4c6c8 100644
--- a/libsemanage/src/genhomedircon.c
+++ b/libsemanage/src/genhomedircon.c
@@ -772,7 +772,7 @@ static int setup_fallback_user(genhomedircon_settings_t * s)
 			if (semanage_user_query(s->h_semanage, key, &u) < 0)
 			{
 				prefix = name;
-				level = "s0";
+				level = FALLBACK_USER_LEVEL;
 			}
 			else
 			{
@@ -863,7 +863,7 @@ static genhomedircon_user_entry_t *get_users(genhomedircon_settings_t * s,
 			level = semanage_user_get_mlslevel(*u);
 		} else {
 			prefix = name;
-			level = "s0";
+			level = FALLBACK_USER_LEVEL;
 		}
 
 		retval = getpwnam_r(name, &pwstorage, rbuf, rbuflen, &pwent);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-27 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-26 13:57 [PATCH 1/4] libsemanage -- fallback-user-level Laurent Bigonville
2012-03-26 14:51 ` Russell Coker
2012-03-27 14:14 ` 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.