* fix setfiles segfault caused by libselinux-1.22
@ 2005-04-04 13:08 Andreas Steinmetz
2005-04-04 15:30 ` Stephen Smalley
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Steinmetz @ 2005-04-04 13:08 UTC (permalink / raw)
To: selinux
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
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
[-- Attachment #2: libselinux-1.22.diff --]
[-- Type: text/plain, Size: 617 bytes --]
--- 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;
}
/*
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: fix setfiles segfault caused by libselinux-1.22
2005-04-04 13:08 fix setfiles segfault caused by libselinux-1.22 Andreas Steinmetz
@ 2005-04-04 15:30 ` Stephen Smalley
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Smalley @ 2005-04-04 15:30 UTC (permalink / raw)
To: Andreas Steinmetz; +Cc: selinux
On Mon, 2005-04-04 at 15:08 +0200, Andreas Steinmetz wrote:
> 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.
Thanks, merged as of libselinux 1.23.4.
--
Stephen Smalley <sds@tycho.nsa.gov>
National Security Agency
--
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-04 15:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-04 13:08 fix setfiles segfault caused by libselinux-1.22 Andreas Steinmetz
2005-04-04 15:30 ` Stephen Smalley
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.