All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Gyurdiev <ivg2@cornell.edu>
To: SELinux ML <selinux@tycho.nsa.gov>
Cc: Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: Bug in the semanage user management code or genhomedircon?
Date: Thu, 16 Mar 2006 17:02:39 -0500	[thread overview]
Message-ID: <4419E07F.4090508@cornell.edu> (raw)
In-Reply-To: <20060316204512.GB30979@hydrogenium.cip.ifi.lmu.de>

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


> What am I doing wrong?
>   
Can you let me know what you see with the following policycoreutils 
patch, when you try the same thing (do semanage user -l, should show the 
labeling prefix for each user). Dan, you can merge if you want to - I 
don't know if the alignment is ok - are you trying to fit within 
80-columns or something like that?

P.S. I see those get_all() functions being used outside seobject.py (in 
chcat), which doesn't seem like a good idea - breaks encapsulation, and 
adding things like I just did will cause damage.


[-- Attachment #2: semanage.prefix.diff --]
[-- Type: text/x-patch, Size: 1496 bytes --]

diff -Naurp --exclude-from excludes old/policycoreutils/semanage/seobject.py new/policycoreutils/semanage/seobject.py
--- old/policycoreutils/semanage/seobject.py	2006-03-08 12:16:06.000000000 -0500
+++ new/policycoreutils/semanage/seobject.py	2006-03-16 16:56:37.000000000 -0500
@@ -549,7 +549,7 @@ class seluserRecords(semanageRecords):
 				raise ValueError("Could not list roles for user %s" % name)
 
 			roles = string.join(rlist, ' ');
-			ddict[semanage_user_get_name(u)] = (semanage_user_get_mlslevel(u), semanage_user_get_mlsrange(u), roles)
+			ddict[semanage_user_get_name(u)] = (semanage_user_get_prefix(u), semanage_user_get_mlslevel(u), semanage_user_get_mlsrange(u), roles)
 
 		return ddict
 
@@ -559,10 +559,10 @@ class seluserRecords(semanageRecords):
 		keys.sort()
 		if is_mls_enabled == 1:
 			if heading:
-				print "\n%-15s %-10s %-30s" % ("", "MLS/", "MLS/")
-				print "%-15s %-10s %-30s %s\n" % ("SELinux User", "MCS Level", "MCS Range", "SELinux Roles")
+				print "\n%-15s %-10s %-10s %-30s" % ("", "Labeling", "MLS/", "MLS/")
+				print "%-15s %-10s %-10s %-30s %s\n" % ("SELinux User", "Prefix", "MCS Level", "MCS Range", "SELinux Roles")
 			for k in keys:
-				print "%-15s %-10s %-30s %s" % (k, translate(ddict[k][0]), translate(ddict[k][1]), ddict[k][2])
+				print "%-15s %-10s %-10s %-30s %s" % (k, ddict[k][0], translate(ddict[k][1]), translate(ddict[k][2]), ddict[k][3])
 		else:
 			if heading:
 				print "%-15s %s\n" % ("SELinux User", "SELinux Roles")

  reply	other threads:[~2006-03-16 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-16 20:45 Bug in the semanage user management code or genhomedircon? Thomas Bleher
2006-03-16 22:02 ` Ivan Gyurdiev [this message]
2006-03-17  7:11   ` Thomas Bleher
2006-03-17 12:46     ` Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4419E07F.4090508@cornell.edu \
    --to=ivg2@cornell.edu \
    --cc=dwalsh@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.