Research Menu

.
Skip Search Box

SELinux Mailing List

fix setfiles segfault caused by libselinux-1.22

From: Andreas Steinmetz <ast_at_domdv.de>
Date: Mon, 04 Apr 2005 15:08:55 +0200


setfiles does reset user defined functions by calling the related setup function with NULL as argument. Instead of resetting to the default these setup functions did set up NULL as the function pointer. Fix attached.

-- 
Andreas Steinmetz                       SPAMmers use robotrap@domdv.de

--- libselinux-1.22.orig/src/matchpathcon.c 2005-04-04 15:01:14.000000000 +0200 +++ libselinux-1.22/src/matchpathcon.c 2005-04-04 15:01:23.000000000 +0200 @@ -29,7 +29,10 @@ void set_matchpathcon_printf(void (*f)(const char *fmt, ...)) { - myprintf = f;
+ if (f)
+ myprintf = f;
+ else
+ myprintf = &default_printf;
} static int default_invalidcon(const char *path, unsigned lineno, char *context) @@ -45,7 +48,10 @@ void set_matchpathcon_invalidcon(int (*f)(const char *p, unsigned l, char *c)) { - myinvalidcon = f;
+ if (f)
+ myinvalidcon = f;
+ else
+ myinvalidcon = &default_invalidcon;
} /* -- 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.

Received on Mon 4 Apr 2005 - 09:10:59 EDT
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service