From: Daniel J Walsh <dwalsh@redhat.com>
To: Joshua Brindle <method@manicmethod.com>
Cc: Chad Sellers <csellers@tresys.com>, SE Linux <selinux@tycho.nsa.gov>
Subject: Re: libsemanage patch
Date: Wed, 16 Sep 2009 13:27:25 -0400 [thread overview]
Message-ID: <4AB11FFD.3060101@redhat.com> (raw)
In-Reply-To: <4AB102CE.3070102@manicmethod.com>
[-- Attachment #1: Type: text/plain, Size: 42 bytes --]
Updated patch. Need check in two places.
[-- Attachment #2: libsemanage-genhomedir.patch --]
[-- Type: text/plain, Size: 826 bytes --]
--- nsalibsemanage/src/genhomedircon.c 2008-08-28 09:34:24.000000000 -0400
+++ libsemanage-2.0.37/src/genhomedircon.c 2009-09-16 13:25:43.000000000 -0400
@@ -304,6 +304,10 @@
continue;
if (!semanage_list_find(shells, pwbuf->pw_shell))
continue;
+ int len = strlen(pwbuf->pw_dir) -1;
+ for(; len > 0 && pwbuf->pw_dir[len] == '/'; len--) {
+ pwbuf->pw_dir[len] = '\0';
+ }
if (strcmp(pwbuf->pw_dir, "/") == 0)
continue;
if (semanage_str_count(pwbuf->pw_dir, '/') <= 1)
@@ -788,6 +792,11 @@
continue;
}
+ int len = strlen(pwent->pw_dir) -1;
+ for(; len > 0 && pwent->pw_dir[len] == '/'; len--) {
+ pwent->pw_dir[len] = '\0';
+ }
+
if (strcmp(pwent->pw_dir, "/") == 0) {
/* don't relabel / genhomdircon checked to see if root
* was the user and if so, set his home directory to
next prev parent reply other threads:[~2009-09-16 17:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 14:36 libsemanage patch Daniel J Walsh
2009-08-11 21:22 ` Chad Sellers
2009-09-04 13:56 ` Joshua Brindle
2009-09-07 10:44 ` Daniel J Walsh
2009-09-08 16:04 ` Chad Sellers
2009-09-16 15:22 ` Joshua Brindle
2009-09-16 15:55 ` Joshua Brindle
2009-09-16 17:27 ` Daniel J Walsh [this message]
2009-09-16 21:12 ` Joshua Brindle
-- strict thread matches above, loose matches on Subject: below --
2007-12-03 19:31 Daniel J Walsh
2007-12-03 19:51 ` Todd Miller
2007-12-03 19:53 ` Stephen Smalley
2007-12-03 20:03 ` Todd Miller
2007-12-03 20:08 ` Daniel J Walsh
2007-12-03 20:49 ` Daniel J Walsh
2007-12-05 17:48 ` 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=4AB11FFD.3060101@redhat.com \
--to=dwalsh@redhat.com \
--cc=csellers@tresys.com \
--cc=method@manicmethod.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.