]>
Commit | Line | Data |
---|---|---|
b72e9819 PZ |
1 | ? build |
2 | Index: ChangeLog | |
3 | =================================================================== | |
4 | RCS file: /usr/local/CVS/libuser/ChangeLog,v | |
5 | retrieving revision 1.143 | |
6 | retrieving revision 1.144 | |
7 | diff -u -r1.143 -r1.144 | |
8 | --- ChangeLog 25 Oct 2007 06:36:56 -0000 1.143 | |
9 | +++ ChangeLog 30 Oct 2007 22:23:33 -0000 1.144 | |
10 | @@ -1,3 +1,8 @@ | |
11 | +2007-10-30 Miloslav Trmač <mitr@redhat.com> | |
12 | + | |
13 | + * lib/util.c (lu_util_fscreate_restore) [WITH_SELINUX]: Fix use of | |
14 | + uninitialized data when SELinux is disabled. | |
15 | + | |
16 | 2007-10-25 Miloslav Trmač <mitr@redhat.com> | |
17 | ||
18 | * configure.in: Version 0.56.6. | |
19 | Index: lib/util.c | |
20 | =================================================================== | |
21 | RCS file: /usr/local/CVS/libuser/lib/util.c,v | |
22 | retrieving revision 1.16 | |
23 | retrieving revision 1.17 | |
24 | diff -u -r1.16 -r1.17 | |
25 | --- lib/util.c 25 Oct 2007 05:48:04 -0000 1.16 | |
26 | +++ lib/util.c 30 Oct 2007 22:23:33 -0000 1.17 | |
27 | @@ -613,10 +613,11 @@ | |
28 | void | |
29 | lu_util_fscreate_restore(security_context_t ctx) | |
30 | { | |
31 | - /* Don't check is_selinux_enabled(), we ignore errors anyway */ | |
32 | - (void)setfscreatecon(ctx); | |
33 | - if (ctx) | |
34 | - freecon(ctx); | |
35 | + if (is_selinux_enabled() > 0) { | |
36 | + (void)setfscreatecon(ctx); | |
37 | + if (ctx) | |
38 | + freecon(ctx); | |
39 | + } | |
40 | } | |
41 | ||
42 | /* Set fscreate context from context of file. */ |