All of lore.kernel.org
 help / color / mirror / Atom feed
* is this pretty much it (to patch kdm 3.2.2)?
@ 2004-05-19  7:42 Luke Kenneth Casson Leighton
  2004-05-19 10:08 ` Thomas Bleher
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Luke Kenneth Casson Leighton @ 2004-05-19  7:42 UTC (permalink / raw)
  To: SE-Linux

is this pretty much all that's required???  compared to the 2.4 stuff
it's like tiny.

this is all that the patch to wdm does.  i'm just a little surprised
(pleasantly so).

l.

--- client.c.old	2004-05-19 07:40:58.000000000 +0000
+++ kdm/backend/client.c	2004-05-19 07:18:01.000000000 +0000
@@ -44,6 +44,12 @@
 #include <sys/stat.h>
 #include <pwd.h>
 #include <grp.h>
+
+#ifdef WITH_SELINUX
+#include <selinux/get_context_list.h>
+#include <selinux/selinux.h>
+#endif
+
 #ifdef SECURE_RPC
 # include <rpc/rpc.h>
 # include <rpc/key_prot.h>
@@ -1085,6 +1091,24 @@
 	   systemEnviron);
 
     /*
+     * for Security Enhanced Linux,
+     * set the default security context for this user.
+     */
+#ifdef WITH_SELINUX
+   if (is_selinux_enabled())
+   {
+        security_context_t scontext;
+        if (get_default_context(name,NULL,&scontext))
+             LogError("Failed to get default security context for %s.", name);
+        Debug("setting security context to %s", scontext);
+        if (setexeccon(scontext)) {
+             freecon(scontext);
+             LogError("Failed to set exec security context %s for %s.", scontext, name);
+        }
+        freecon(scontext);
+   }
+#endif
+    /*
      * for user-based authorization schemes,
      * add the user to the server's allowed "hosts" list.
      */
-- 
-- 
expecting email to be received and understood is a bit like
picking up the telephone and immediately dialing without
checking for a dial-tone; speaking immediately without listening
for either an answer or ring-tone; hanging up immediately and
believing that you have actually started a conversation.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:lkcl@lkcl.net"> lkcl@lkcl.net </a> <br />


--
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] 19+ messages in thread

end of thread, other threads:[~2004-05-20 18:13 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-19  7:42 is this pretty much it (to patch kdm 3.2.2)? Luke Kenneth Casson Leighton
2004-05-19 10:08 ` Thomas Bleher
2004-05-19 11:50   ` Luke Kenneth Casson Leighton
2004-05-20 12:11     ` Thomas Bleher
2004-05-20 12:49       ` Stephen Smalley
2004-05-20 14:52         ` Luke Kenneth Casson Leighton
2004-05-20 15:39           ` Russell Coker
2004-05-20 16:14             ` Luke Kenneth Casson Leighton
2004-05-20 16:26               ` Stephen Smalley
2004-05-20 16:45                 ` Luke Kenneth Casson Leighton
2004-05-20 17:06             ` Luke Kenneth Casson Leighton
2004-05-20 17:24             ` Luke Kenneth Casson Leighton
2004-05-19 12:16   ` Stephen Smalley
2004-05-19 12:34 ` Stephen Smalley
2004-05-19 12:47   ` Luke Kenneth Casson Leighton
2004-05-19 14:05 ` Russell Coker
2004-05-19 14:39   ` Luke Kenneth Casson Leighton
2004-05-19 17:23     ` kdm 3.2.2 and kernel image 2.6.6 selinux .debs available Luke Kenneth Casson Leighton
2004-05-19 17:37       ` Luke Kenneth Casson Leighton

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.