| 
      
      
      From: <kma...@us...> - 2007-02-01 21:17:41
       | 
| Revision: 2213
          http://svn.sourceforge.net/selinux/?rev=2213&view=rev
Author:   kmacmillan
Date:     2007-02-01 13:17:35 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
Author: "Todd C. Miller"
Email: Tod...@sp...
Subject: PATCH: libselinux matchpathcon() memory leak
Date: Thu, 25 Jan 2007 18:59:07 -0500 (EST)
This is a patch I sent in last year but forgot to split up as
requested; it still applies to the recently-released selinux-1.34.0.
This patch adds a finish: label and ret variable that holds the
function return value.  Instead of returning early we just goto
finish and let it clean things up as needed.  This does assume that
free(NULL) is valid but that as been the case since C89.
 - todd
Acked-by: Karl MacMillan <kma...@me...>
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/src/matchpathcon.c
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-02-01 21:04:24 UTC (rev 2212)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-02-01 21:17:35 UTC (rev 2213)
@@ -1,3 +1,5 @@
+	* Merged patch from Todd Miller to fix memory leak in matchpathcon.c.
+
 1.34.1 2007-01-26
 	* Merged python binding fixes from Dan Walsh.
 
Modified: branches/stable/1_0/libselinux/src/matchpathcon.c
===================================================================
--- branches/stable/1_0/libselinux/src/matchpathcon.c	2007-02-01 21:04:24 UTC (rev 2212)
+++ branches/stable/1_0/libselinux/src/matchpathcon.c	2007-02-01 21:17:35 UTC (rev 2213)
@@ -443,11 +443,13 @@
 static int process_line(const char *path, const char *prefix, char *line_buf,
 			int pass, unsigned lineno)
 {
-	int items, len, regerr;
+	int items, len, regerr, ret;
 	char *buf_p;
 	char *regex, *type, *context;
 	const char *reg_buf;
 	char *anchored_regex;
+
+	ret = 0;
 	len = strlen(line_buf);
 	if (line_buf[len - 1] == '\n')
 		line_buf[len - 1] = 0;
@@ -464,19 +466,15 @@
 		return 0;
 	} else if (items == 2) {
 		/* The type field is optional. */
-		free(context);
 		context = type;
-		type = 0;
+		type = NULL;
 	}
 
 	reg_buf = regex;
 	len = get_stem_from_spec(reg_buf);
 	if (len && prefix && strncmp(prefix, regex, len)) {
 		/* Stem of regex does not match requested prefix, discard. */
-		free(regex);
-		free(type);
-		free(context);
-		return 0;
+		goto finish;
 	}
 
 	if (pass == 1) {
@@ -488,8 +486,10 @@
 		/* Anchor the regular expression. */
 		len = strlen(reg_buf);
 		cp = anchored_regex = malloc(len + 3);
-		if (!anchored_regex)
-			return -1;
+		if (!anchored_regex) {
+			ret = -1;
+			goto finish;
+		}
 		/* Create ^...$ regexp.  */
 		*cp++ = '^';
 		cp = mempcpy(cp, reg_buf, len);
@@ -515,7 +515,7 @@
 				 path, lineno, anchored_regex,
 				 (errbuf ? errbuf : "out of memory"));
 			free(anchored_regex);
-			return 0;
+			goto finish;
 		}
 		free(anchored_regex);
 
@@ -528,7 +528,7 @@
 		if (type[0] != '-' || len != 2) {
 			myprintf("%s:  line %d has invalid file type %s\n",
 				 path, lineno, type);
-			return 0;
+			goto finish;
 		}
 		switch (type[1]) {
 		case 'b':
@@ -555,7 +555,7 @@
 		default:
 			myprintf("%s:  line %d has invalid file type %s\n",
 				 path, lineno, type);
-			return 0;
+			goto finish;
 		}
 
 	      skip_type:
@@ -564,11 +564,11 @@
 				if (myinvalidcon) {
 					/* Old-style validation of context. */
 					if (myinvalidcon(path, lineno, context))
-						return 0;
+						goto finish;
 				} else {
 					/* New canonicalization of context. */
 					if (mycanoncon(path, lineno, &context))
-						return 0;
+						goto finish;
 				}
 				spec_arr[nspec].context_valid = 1;
 			}
@@ -579,16 +579,19 @@
 		/* Determine if specification has 
 		 * any meta characters in the RE */
 		spec_hasMetaChars(&spec_arr[nspec]);
+
+		/* Prevent stored strings from being freed. */
+		regex = NULL;
+		type = NULL;
+		context = NULL;
 	}
 
 	nspec++;
-	if (pass == 0) {
-		free(regex);
-		if (type)
-			free(type);
-		free(context);
-	}
-	return 0;
+finish:
+	free(regex);
+	free(type);
+	free(context);
+	return ret;
 }
 
 int matchpathcon_init_prefix(const char *path, const char *prefix)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <kma...@us...> - 2007-02-01 21:19:20
       | 
| Revision: 2214
          http://svn.sourceforge.net/selinux/?rev=2214&view=rev
Author:   kmacmillan
Date:     2007-02-01 13:19:18 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
Author: "Todd C. Miller"
Email: Tod...@sp...
Subject: PATCH: libselinux matchpathcon() eliminate %as scanf format
Date: Thu, 25 Jan 2007 18:59:22 -0500 (EST)
This is a patch I sent in last year but forgot to split up as
requested; it still applies to the recently-released selinux-1.34.0.
THe patch replaces usage of the non-standard %as scanf() format
(which conflicts with C99) with strtok_r().  This does mean that
line_buf is modified but this variable is only used as an argument
to process_line() and is freed thereafter.
I made this change as part of the port of libselinux to SEBSD and
SEDarwin.
 - todd
Acked-by: Karl MacMillan with minor style updates.
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/src/matchpathcon.c
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-02-01 21:17:35 UTC (rev 2213)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-02-01 21:19:18 UTC (rev 2214)
@@ -1,3 +1,6 @@
+	* Merged patch from Todd Miller to remove sscanf in matchpathcon.c because
+	  of the use of the non-standard format %as. (original patch changed
+	  for style).
 	* Merged patch from Todd Miller to fix memory leak in matchpathcon.c.
 
 1.34.1 2007-01-26
Modified: branches/stable/1_0/libselinux/src/matchpathcon.c
===================================================================
--- branches/stable/1_0/libselinux/src/matchpathcon.c	2007-02-01 21:17:35 UTC (rev 2213)
+++ branches/stable/1_0/libselinux/src/matchpathcon.c	2007-02-01 21:19:18 UTC (rev 2214)
@@ -444,7 +444,7 @@
 			int pass, unsigned lineno)
 {
 	int items, len, regerr, ret;
-	char *buf_p;
+	char *buf_p, *ptr;
 	char *regex, *type, *context;
 	const char *reg_buf;
 	char *anchored_regex;
@@ -459,7 +459,18 @@
 	/* Skip comment lines and empty lines. */
 	if (*buf_p == '#' || *buf_p == 0)
 		return 0;
-	items = sscanf(line_buf, "%as %as %as", ®ex, &type, &context);
+
+	items = 0;
+	regex = strtok_r(buf_p, " \t", &ptr);
+	if (regex)
+		items += 1;
+	type = strtok_r(NULL, " \t", &ptr);
+	if (type)
+		items += 1;
+	context = strtok_r(NULL, " \t", &ptr);
+	if (context)
+		items += 1;
+	
 	if (items < 2) {
 		myprintf("%s:  line %d is missing fields, skipping\n", path,
 			 lineno);
@@ -470,6 +481,23 @@
 		type = NULL;
 	}
 
+	regex = strdup(regex);
+	if (!regex) {
+		return -1;
+	}
+	if (type) {
+		type = strdup(type);
+		if (!type) {
+			ret = -1;
+			goto finish;
+		}
+	}
+	context = strdup(context);
+	if (!context) {
+		ret = -1;
+		goto finish;
+	}
+
 	reg_buf = regex;
 	len = get_stem_from_spec(reg_buf);
 	if (len && prefix && strncmp(prefix, regex, len)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <kma...@us...> - 2007-02-01 21:20:16
       | 
| Revision: 2215
          http://svn.sourceforge.net/selinux/?rev=2215&view=rev
Author:   kmacmillan
Date:     2007-02-01 13:20:12 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
libselinux version 1.34.2
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/VERSION
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-02-01 21:19:18 UTC (rev 2214)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-02-01 21:20:12 UTC (rev 2215)
@@ -1,3 +1,4 @@
+1.34.2 2007-02-01
 	* Merged patch from Todd Miller to remove sscanf in matchpathcon.c because
 	  of the use of the non-standard format %as. (original patch changed
 	  for style).
Modified: branches/stable/1_0/libselinux/VERSION
===================================================================
--- branches/stable/1_0/libselinux/VERSION	2007-02-01 21:19:18 UTC (rev 2214)
+++ branches/stable/1_0/libselinux/VERSION	2007-02-01 21:20:12 UTC (rev 2215)
@@ -1 +1 @@
-1.34.1
+1.34.2
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ssm...@us...> - 2007-02-23 18:29:27
       | 
| Revision: 2270
          http://svn.sourceforge.net/selinux/?rev=2270&view=rev
Author:   ssmalley
Date:     2007-02-23 10:29:22 -0800 (Fri, 23 Feb 2007)
Log Message:
-----------
Ported r2268 from trunk.
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/VERSION
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-02-23 18:27:12 UTC (rev 2269)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-02-23 18:29:22 UTC (rev 2270)
@@ -1,3 +1,6 @@
+1.34.6 2007-02-23
+	* Removed sending of setrans init message.
+
 1.34.5 2007-02-22
 	* Merged matchpathcon memory leak fix from Steve Grubb.
 
Modified: branches/stable/1_0/libselinux/VERSION
===================================================================
--- branches/stable/1_0/libselinux/VERSION	2007-02-23 18:27:12 UTC (rev 2269)
+++ branches/stable/1_0/libselinux/VERSION	2007-02-23 18:29:22 UTC (rev 2270)
@@ -1 +1 @@
-1.34.5
+1.34.6
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ssm...@us...> - 2007-03-20 12:30:02
       | 
| Revision: 2294
          http://svn.sourceforge.net/selinux/?rev=2294&view=rev
Author:   ssmalley
Date:     2007-03-20 04:43:07 -0700 (Tue, 20 Mar 2007)
Log Message:
-----------
Updated ChangeLog and VERSION.
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/VERSION
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-03-20 11:41:46 UTC (rev 2293)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-03-20 11:43:07 UTC (rev 2294)
@@ -1,3 +1,6 @@
+1.34.7 2007-03-20
+	* Merged fix for avc.h #include's from Eamon Walsh.
+
 1.34.6 2007-02-23
 	* Removed sending of setrans init message.
 
Modified: branches/stable/1_0/libselinux/VERSION
===================================================================
--- branches/stable/1_0/libselinux/VERSION	2007-03-20 11:41:46 UTC (rev 2293)
+++ branches/stable/1_0/libselinux/VERSION	2007-03-20 11:43:07 UTC (rev 2294)
@@ -1 +1 @@
-1.34.6
+1.34.7
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ssm...@us...> - 2007-04-24 13:48:26
       | 
| Revision: 2361
          http://svn.sourceforge.net/selinux/?rev=2361&view=rev
Author:   ssmalley
Date:     2007-04-24 06:48:25 -0700 (Tue, 24 Apr 2007)
Log Message:
-----------
Updated ChangeLog and VERSION.
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/VERSION
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-04-24 13:47:44 UTC (rev 2360)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-04-24 13:48:25 UTC (rev 2361)
@@ -1,3 +1,6 @@
+1.34.9 2007-04-24
+	* Merged build fix for avc_internal.c from Joshua Brindle.	
+
 1.34.8 2007-04-12
 	* Merged rpm_execcon python binding fix, matchpathcon man page fix, and getsebool -a handling for EACCES from Dan Walsh.
 	* Merged userspace AVC patch to follow kernel's behavior for permissive mode in caching previous denials from Eamon Walsh.
Modified: branches/stable/1_0/libselinux/VERSION
===================================================================
--- branches/stable/1_0/libselinux/VERSION	2007-04-24 13:47:44 UTC (rev 2360)
+++ branches/stable/1_0/libselinux/VERSION	2007-04-24 13:48:25 UTC (rev 2361)
@@ -1 +1 @@
-1.34.8
+1.34.9
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ssm...@us...> - 2007-04-27 16:55:00
       | 
| Revision: 2414
          http://svn.sourceforge.net/selinux/?rev=2414&view=rev
Author:   ssmalley
Date:     2007-04-27 09:54:59 -0700 (Fri, 27 Apr 2007)
Log Message:
-----------
updated libselinux to version 1.34.10
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/VERSION
    branches/stable/1_0/libselinux/src/load_policy.c
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-04-27 16:37:51 UTC (rev 2413)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-04-27 16:54:59 UTC (rev 2414)
@@ -1,3 +1,6 @@
+1.34.10 2007-04-27
+	* Merged helpful message when selinuxfs mount fails patch from Dax Kelson.
+
 1.34.9 2007-04-24
 	* Merged build fix for avc_internal.c from Joshua Brindle.	
 
Modified: branches/stable/1_0/libselinux/VERSION
===================================================================
--- branches/stable/1_0/libselinux/VERSION	2007-04-27 16:37:51 UTC (rev 2413)
+++ branches/stable/1_0/libselinux/VERSION	2007-04-27 16:54:59 UTC (rev 2414)
@@ -1 +1 @@
-1.34.9
+1.34.10
Modified: branches/stable/1_0/libselinux/src/load_policy.c
===================================================================
--- branches/stable/1_0/libselinux/src/load_policy.c	2007-04-27 16:37:51 UTC (rev 2413)
+++ branches/stable/1_0/libselinux/src/load_policy.c	2007-04-27 16:54:59 UTC (rev 2414)
@@ -227,6 +227,7 @@
 			 */
 			*enforce = 0;
 		}
+		fprintf(stderr, "Mount failed for selinuxfs on %s:  %s\n", SELINUXMNT, strerror(errno));
 		goto noload;
 	}
 	set_selinuxmnt(SELINUXMNT);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <mad...@us...> - 2007-07-09 17:35:52
       | 
| Revision: 2491
          http://svn.sourceforge.net/selinux/?rev=2491&view=rev
Author:   madmethod
Date:     2007-07-09 10:35:49 -0700 (Mon, 09 Jul 2007)
Log Message:
-----------
Author: Stephen Smalley
Email: sd...@ty...
Subject: libselinux: fix getfilecon handling of zero-length context
Date: Mon, 09 Jul 2007 12:45:53 -0400
As observed by John Ramsdell, *getfilecon() on a /proc/sys inode on
returns garbage and can lead to memory corruption upon later freecon.
This happens on 2.6.21 and later due to the proc sysctl rewrite in the
kernel.  The *getfilecon_raw() functions correctly return zero in this
case, but the non-raw functions are not handling that result properly.
Initialize *context on entry to *getfilecon() so that it has a
well-defined value even if *getfilecon_raw() returns zero.
Signed-off-by:  Stephen Smalley <sd...@ty...>
Acked-By: Joshua Brindle <me...@ma...>
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/VERSION
    branches/stable/1_0/libselinux/src/fgetfilecon.c
    branches/stable/1_0/libselinux/src/getfilecon.c
    branches/stable/1_0/libselinux/src/lgetfilecon.c
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-06-22 19:38:14 UTC (rev 2490)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-07-09 17:35:49 UTC (rev 2491)
@@ -1,3 +1,7 @@
+1.34.11	2007-07-09
+	* Merged fix for getfilecon() handling of zero-length contexts from
+	  Stephen Smalley.
+
 1.34.10 2007-04-27
 	* Merged helpful message when selinuxfs mount fails patch from Dax Kelson.
 
Modified: branches/stable/1_0/libselinux/VERSION
===================================================================
--- branches/stable/1_0/libselinux/VERSION	2007-06-22 19:38:14 UTC (rev 2490)
+++ branches/stable/1_0/libselinux/VERSION	2007-07-09 17:35:49 UTC (rev 2491)
@@ -1 +1 @@
-1.34.10
+1.34.11
Modified: branches/stable/1_0/libselinux/src/fgetfilecon.c
===================================================================
--- branches/stable/1_0/libselinux/src/fgetfilecon.c	2007-06-22 19:38:14 UTC (rev 2490)
+++ branches/stable/1_0/libselinux/src/fgetfilecon.c	2007-07-09 17:35:49 UTC (rev 2491)
@@ -51,6 +51,8 @@
 	security_context_t rcontext;
 	int ret;
 
+	*context = NULL;
+
 	ret = fgetfilecon_raw(fd, &rcontext);
 
 	if (ret > 0) {
Modified: branches/stable/1_0/libselinux/src/getfilecon.c
===================================================================
--- branches/stable/1_0/libselinux/src/getfilecon.c	2007-06-22 19:38:14 UTC (rev 2490)
+++ branches/stable/1_0/libselinux/src/getfilecon.c	2007-07-09 17:35:49 UTC (rev 2491)
@@ -51,6 +51,8 @@
 	int ret;
 	security_context_t rcontext;
 
+	*context = NULL;
+
 	ret = getfilecon_raw(path, &rcontext);
 
 	if (ret > 0) {
Modified: branches/stable/1_0/libselinux/src/lgetfilecon.c
===================================================================
--- branches/stable/1_0/libselinux/src/lgetfilecon.c	2007-06-22 19:38:14 UTC (rev 2490)
+++ branches/stable/1_0/libselinux/src/lgetfilecon.c	2007-07-09 17:35:49 UTC (rev 2491)
@@ -51,6 +51,8 @@
 	int ret;
 	security_context_t rcontext;
 
+	*context = NULL;
+
 	ret = lgetfilecon_raw(path, &rcontext);
 
 	if (ret > 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ssm...@us...> - 2007-09-12 15:50:49
       | 
| Revision: 2561
          http://selinux.svn.sourceforge.net/selinux/?rev=2561&view=rev
Author:   ssmalley
Date:     2007-09-12 08:50:45 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
updated libselinux to version 1.34.12
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/VERSION
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-09-12 15:49:33 UTC (rev 2560)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-09-12 15:50:45 UTC (rev 2561)
@@ -1,3 +1,6 @@
+1.34.12 2007-09-12
+	* Further fix for getfilecon() handling of zero-length contexts from Stephen Smalley.
+
 1.34.11	2007-07-09
 	* Merged fix for getfilecon() handling of zero-length contexts from
 	  Stephen Smalley.
Modified: branches/stable/1_0/libselinux/VERSION
===================================================================
--- branches/stable/1_0/libselinux/VERSION	2007-09-12 15:49:33 UTC (rev 2560)
+++ branches/stable/1_0/libselinux/VERSION	2007-09-12 15:50:45 UTC (rev 2561)
@@ -1 +1 @@
-1.34.11
+1.34.12
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ssm...@us...> - 2007-09-24 16:22:46
       | 
| Revision: 2579
          http://selinux.svn.sourceforge.net/selinux/?rev=2579&view=rev
Author:   ssmalley
Date:     2007-09-24 09:21:53 -0700 (Mon, 24 Sep 2007)
Log Message:
-----------
updated libselinux to version 1.34.13
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/VERSION
    branches/stable/1_0/libselinux/src/Makefile
    branches/stable/1_0/libselinux/src/avc_internal.c
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-09-24 16:14:59 UTC (rev 2578)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-09-24 16:21:53 UTC (rev 2579)
@@ -1,3 +1,7 @@
+1.34.13 2007-09-24
+       * Make netlink socket close-on-exec to avoid descriptor leakage from Dan Walsh.
+       * Pass CFLAGS when using gcc for linking from Dennis Gilmore. 
+
 1.34.12 2007-09-12
 	* Further fix for getfilecon() handling of zero-length contexts from Stephen Smalley.
 
Modified: branches/stable/1_0/libselinux/VERSION
===================================================================
--- branches/stable/1_0/libselinux/VERSION	2007-09-24 16:14:59 UTC (rev 2578)
+++ branches/stable/1_0/libselinux/VERSION	2007-09-24 16:21:53 UTC (rev 2579)
@@ -1 +1 @@
-1.34.12
+1.34.13
Modified: branches/stable/1_0/libselinux/src/Makefile
===================================================================
--- branches/stable/1_0/libselinux/src/Makefile	2007-09-24 16:14:59 UTC (rev 2578)
+++ branches/stable/1_0/libselinux/src/Makefile	2007-09-24 16:21:53 UTC (rev 2579)
@@ -45,10 +45,10 @@
 	$(CC) $(CFLAGS) -I$(PYINC) -fPIC -DSHARED -c -o $@ $<
 
 $(SWIGSO): $(SWIGLOBJ)
-	$(CC) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@
+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@
 
 $(LIBSO): $(LOBJS)
-	$(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -lsepol -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -ldl -lsepol -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
 	ln -sf $@ $(TARGET) 
 
 %.o:  %.c policy.h
Modified: branches/stable/1_0/libselinux/src/avc_internal.c
===================================================================
--- branches/stable/1_0/libselinux/src/avc_internal.c	2007-09-24 16:14:59 UTC (rev 2578)
+++ branches/stable/1_0/libselinux/src/avc_internal.c	2007-09-24 16:21:53 UTC (rev 2579)
@@ -60,7 +60,8 @@
 		rc = fd;
 		goto out;
 	}
-
+	
+	fcntl(fd, F_SETFD, FD_CLOEXEC);
 	if (!blocking && fcntl(fd, F_SETFL, O_NONBLOCK)) {
 		close(fd);
 		rc = -1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ssm...@us...> - 2007-09-27 13:39:41
       | 
| Revision: 2599
          http://selinux.svn.sourceforge.net/selinux/?rev=2599&view=rev
Author:   ssmalley
Date:     2007-09-27 06:38:54 -0700 (Thu, 27 Sep 2007)
Log Message:
-----------
updated libselinux to version 1.34.14
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/VERSION
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2007-09-27 13:37:46 UTC (rev 2598)
+++ branches/stable/1_0/libselinux/ChangeLog	2007-09-27 13:38:54 UTC (rev 2599)
@@ -1,3 +1,6 @@
+1.34.14 2007-09-27
+	* Refactored SWIG bindings from James Athey.
+
 1.34.13 2007-09-24
        * Make netlink socket close-on-exec to avoid descriptor leakage from Dan Walsh.
        * Pass CFLAGS when using gcc for linking from Dennis Gilmore. 
Modified: branches/stable/1_0/libselinux/VERSION
===================================================================
--- branches/stable/1_0/libselinux/VERSION	2007-09-27 13:37:46 UTC (rev 2598)
+++ branches/stable/1_0/libselinux/VERSION	2007-09-27 13:38:54 UTC (rev 2599)
@@ -1 +1 @@
-1.34.13
+1.34.14
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ssm...@us...> - 2007-09-28 19:12:57
       | 
| Revision: 2628
          http://selinux.svn.sourceforge.net/selinux/?rev=2628&view=rev
Author:   ssmalley
Date:     2007-09-28 12:12:52 -0700 (Fri, 28 Sep 2007)
Log Message:
-----------
applied r2626:2627 (copyright disclaimed) from trunk
Modified Paths:
--------------
    branches/stable/1_0/libselinux/src/selinuxswig.i
    branches/stable/1_0/libselinux/src/selinuxswig_python.i
    branches/stable/1_0/libselinux/src/setrans_client.c
    branches/stable/1_0/libselinux/src/setrans_internal.h
    branches/stable/1_0/libselinux/utils/togglesebool.c
Modified: branches/stable/1_0/libselinux/src/selinuxswig.i
===================================================================
--- branches/stable/1_0/libselinux/src/selinuxswig.i	2007-09-28 19:09:13 UTC (rev 2627)
+++ branches/stable/1_0/libselinux/src/selinuxswig.i	2007-09-28 19:12:52 UTC (rev 2628)
@@ -1,22 +1,5 @@
 /* Authors: Dan Walsh
  *          James Athey
- *
- * Copyright (C) 2004-2005 Red Hat
- * Copyright (C) 2007 Tresys Technology, LLC
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
 %module selinux
Modified: branches/stable/1_0/libselinux/src/selinuxswig_python.i
===================================================================
--- branches/stable/1_0/libselinux/src/selinuxswig_python.i	2007-09-28 19:09:13 UTC (rev 2627)
+++ branches/stable/1_0/libselinux/src/selinuxswig_python.i	2007-09-28 19:12:52 UTC (rev 2628)
@@ -1,20 +1,4 @@
 /* Author: James Athey
- *
- * Copyright (C) 2007 Tresys Technology, LLC
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
 %module selinux
Modified: branches/stable/1_0/libselinux/src/setrans_client.c
===================================================================
--- branches/stable/1_0/libselinux/src/setrans_client.c	2007-09-28 19:09:13 UTC (rev 2627)
+++ branches/stable/1_0/libselinux/src/setrans_client.c	2007-09-28 19:12:52 UTC (rev 2628)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006 Trusted Computer Solutions, Inc. */
+/* Author: Trusted Computer Solutions, Inc. */
 
 #include <sys/types.h>
 #include <sys/socket.h>
Modified: branches/stable/1_0/libselinux/src/setrans_internal.h
===================================================================
--- branches/stable/1_0/libselinux/src/setrans_internal.h	2007-09-28 19:09:13 UTC (rev 2627)
+++ branches/stable/1_0/libselinux/src/setrans_internal.h	2007-09-28 19:12:52 UTC (rev 2628)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006 Trusted Computer Solutions, Inc. */
+/* Author: Trusted Computer Solutions, Inc. */
 
 #define SETRANS_UNIX_SOCKET "/var/run/setrans/.setrans-unix"
 
Modified: branches/stable/1_0/libselinux/utils/togglesebool.c
===================================================================
--- branches/stable/1_0/libselinux/utils/togglesebool.c	2007-09-28 19:09:13 UTC (rev 2627)
+++ branches/stable/1_0/libselinux/utils/togglesebool.c	2007-09-28 19:12:52 UTC (rev 2628)
@@ -1,8 +1,3 @@
-/*
- * Copyright 1999-2004 Gentoo Technologies, Inc.
- * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/hardened/policycoreutils-extra/src/toggle_bool.c,v 1.2 2004/06/18 04:09:04 pebenito Exp $
- */
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <ew...@us...> - 2008-02-25 20:55:16
       | 
| Revision: 2815
          http://selinux.svn.sourceforge.net/selinux/?rev=2815&view=rev
Author:   ewalsh
Date:     2008-02-25 12:55:08 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
updated libselinux to version 1.34.15
Modified Paths:
--------------
    branches/stable/1_0/libselinux/ChangeLog
    branches/stable/1_0/libselinux/VERSION
Modified: branches/stable/1_0/libselinux/ChangeLog
===================================================================
--- branches/stable/1_0/libselinux/ChangeLog	2008-02-25 20:53:58 UTC (rev 2814)
+++ branches/stable/1_0/libselinux/ChangeLog	2008-02-25 20:55:08 UTC (rev 2815)
@@ -1,3 +1,6 @@
+1.34.15 2008-02-25
+	* Merged avc_has_perm() errno fix from Eamon Walsh.
+
 1.34.14 2007-09-27
 	* Refactored SWIG bindings from James Athey.
 
Modified: branches/stable/1_0/libselinux/VERSION
===================================================================
--- branches/stable/1_0/libselinux/VERSION	2008-02-25 20:53:58 UTC (rev 2814)
+++ branches/stable/1_0/libselinux/VERSION	2008-02-25 20:55:08 UTC (rev 2815)
@@ -1 +1 @@
-1.34.14
+1.34.15
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |