All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: SELinux <selinux@tycho.nsa.gov>
Subject: Re: New patch for fixfiles sed script
Date: Wed, 02 Feb 2005 13:46:07 -0500	[thread overview]
Message-ID: <42011FEF.8060708@redhat.com> (raw)
In-Reply-To: <1107368924.890.298.camel@moss-spartans.epoch.ncsc.mil>

One more fix to sed script

 +++ policycoreutils-1.21.10/scripts/fixfiles  2005-02-02 
13:37:23.000000000 -0500
166,168c166,168
< +               -e 's|\.\*|*|g' \
< +               -e 's|\.\+|*|g' | \
< +     sort -u | \
---
 > +               -e 's|\.\*.*|*|g' \
 > +               -e 's|\.\+.*|*|g' | \
 > +     sort -d -u | \
179c179
< +     ${RESTORECON} -R $2 -v -e /root -e /home -e /tmp -e /var/tmp -f -
---
 > +      ${RESTORECON} -R $2 -v -e /root -e /home -e /tmp -e /var/tmp 
-e /dev -f -
185c185


Stephen Smalley wrote:

>On Wed, 2005-02-02 at 12:46, Daniel J Walsh wrote:
>  
>
>>Ok how about this patch.
>>
>>Added -e flag for restorecon
>>    
>>
>
>Merged along with the attached patch as of policycoreutils 1.21.11.
>
>  
>
>------------------------------------------------------------------------
>
>Index: policycoreutils/restorecon/restorecon.c
>===================================================================
>RCS file: /nfshome/pal/CVS/selinux-usr/policycoreutils/restorecon/restorecon.c,v
>retrieving revision 1.25
>diff -u -p -r1.25 restorecon.c
>--- policycoreutils/restorecon/restorecon.c	2 Feb 2005 18:09:33 -0000	1.25
>+++ policycoreutils/restorecon/restorecon.c	2 Feb 2005 18:19:16 -0000
>@@ -50,7 +50,7 @@ static int force=0;
> static int excludeCtr=0;
> struct edir {
> 	char *directory;
>-        int size;
>+        size_t size;
> };
> static struct edir excludeArray[MAX_EXCLUDES];
> static int add_exclude(const char *directory) {
>@@ -68,6 +68,12 @@ static int add_exclude(const char *direc
>     fprintf(stderr, "\"%s\" is not a Directory: mode %o\n", directory,sb.st_mode);
>     return 1;
>   }
>+
>+  if (excludeCtr == MAX_EXCLUDES) {
>+    fprintf(stderr, "Maximum excludes %d exceeded.\n", MAX_EXCLUDES);
>+    return 1;
>+  }
>+
>    excludeArray[excludeCtr].directory = strdup(directory);
>   if (!excludeArray[excludeCtr].directory) {
>     fprintf(stderr, "Out of memory.\n");
>@@ -75,10 +81,6 @@ static int add_exclude(const char *direc
>   }
>   excludeArray[excludeCtr++].size = strlen(directory);
> 
>-  if (excludeCtr > MAX_EXCLUDES) {
>-    fprintf(stderr, "Maximum excludes %d exceeded.\n", MAX_EXCLUDES);
>-    return 1;
>-  }
>   return 0;
> }
> static int exclude(const char *file) {
>Index: policycoreutils/setfiles/setfiles.c
>===================================================================
>RCS file: /nfshome/pal/CVS/selinux-usr/policycoreutils/setfiles/setfiles.c,v
>retrieving revision 1.30
>diff -u -p -r1.30 setfiles.c
>--- policycoreutils/setfiles/setfiles.c	2 Feb 2005 18:09:37 -0000	1.30
>+++ policycoreutils/setfiles/setfiles.c	2 Feb 2005 18:20:18 -0000
>@@ -83,7 +83,7 @@ static int force=0;
> static int excludeCtr=0;
> struct edir {
> 	char *directory;
>-        int size;
>+        size_t size;
> };
> static struct edir excludeArray[MAX_EXCLUDES];
> 
>@@ -131,6 +131,12 @@ static int add_exclude(const char *direc
> 	        fprintf(stderr, "\"%s\" is not a Directory: mode %o\n", directory,sb.st_mode);
> 	        return 1;
> 	}
>+
>+	if (excludeCtr == MAX_EXCLUDES) {
>+	        fprintf(stderr, "Maximum excludes %d exceeded.\n", MAX_EXCLUDES);
>+	        return 1;
>+	}
>+
> 	excludeArray[excludeCtr].directory = strdup(directory);
> 	if (!excludeArray[excludeCtr].directory) {
> 	        fprintf(stderr, "Out of memory.\n");
>@@ -138,10 +144,6 @@ static int add_exclude(const char *direc
> 	}
> 	excludeArray[excludeCtr++].size = strlen(directory);
> 	
>-	if (excludeCtr > MAX_EXCLUDES) {
>-	        fprintf(stderr, "Maximum excludes %d exceeded.\n", MAX_EXCLUDES);
>-	        return 1;
>-	}
> 	return 0;
> }
> 
>  
>


--
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.

      parent reply	other threads:[~2005-02-02 18:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1106940328.32737.120.camel@moss-spartans.epoch.ncsc.mil>
2005-01-28 19:48 ` Latest diffs Daniel J Walsh
2005-02-01 18:45   ` James Carter
2005-02-01 19:48     ` Stephen Smalley
2005-02-01 21:41       ` Ivan Gyurdiev
2005-02-02 12:57         ` Stephen Smalley
2005-02-02 13:08       ` Stephen Smalley
2005-02-02 13:17         ` Stephen Smalley
2005-02-02 13:32           ` Daniel J Walsh
2005-02-04  0:58             ` Ivan Gyurdiev
2005-02-04 12:23               ` Stephen Smalley
2005-02-04 12:42                 ` Ivan Gyurdiev
2005-02-04 12:50                   ` Stephen Smalley
2005-02-04 13:59               ` Daniel J Walsh
2005-02-04 14:10                 ` Stephen Smalley
2005-02-04 15:28                   ` Ivan Gyurdiev
2005-02-07  7:53                     ` Ivan Gyurdiev
2005-02-07 19:33                   ` Richard Hally
2005-02-07 19:34                     ` Stephen Smalley
2005-02-10 15:16             ` James Carter
2005-02-02 13:58           ` New patch for fixfiles sed script Daniel J Walsh
2005-02-02 16:12             ` Stephen Smalley
2005-02-02 16:34               ` Daniel J Walsh
2005-02-02 16:42                 ` Stephen Smalley
2005-02-02 17:46                 ` Daniel J Walsh
2005-02-02 18:28                   ` Stephen Smalley
2005-02-02 18:43                     ` Stephen Smalley
2005-02-02 18:46                     ` Daniel J Walsh [this message]

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=42011FEF.8060708@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=sds@epoch.ncsc.mil \
    --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.