Bug 798 - nscd Makefile minor problem
Summary: nscd Makefile minor problem
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: nscd (show other bugs)
Version: 2.3.4
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-23 05:48 IST by Greg Schafer
Modified: 2018-04-19 14:58 IST (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
minor fix for nscd/Makefile (216 bytes, patch)
2005-03-23 05:49 IST, Greg Schafer
Details | Diff
another minor fix for nscd/Makefile (327 bytes, patch)
2005-07-17 05:38 IST, Greg Schafer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Schafer 2005-03-23 05:48:24 IST
There is a small problem in the nscd/Makefile which is triggered in the
following circumstances:

 * build host is a FC3 system (with libselinux-devel installed)
 * Glibc is configured with `--with-headers=/somewhere-non-standard'

For reference, here is a relevant snippet of configure output:

checking for is_selinux_enabled in -lselinux... yes
checking for NSCD Flask permissions in selinux/av_permissions.h... yes

In these circumstances the build of nscd fails with the following:

nscd_stat.c:34:30: selinux/selinux.h: No such file or directory
nscd_stat.c:35:26: selinux/avc.h: No such file or directory

The cause is due to the Makefile variable $sysincludes which prevents
/usr/include from being searched.

A similar fix went in for malloc/memusagestat with the following ChangeLog:

2002-09-17  Roland McGrath  <roland@redhat.com>

        * malloc/Makefile ($(objpfx)memusagestat.o: sysincludes): Define
        file-specific variable override so it compiles properly when using
        --with-headers.

A similar approach fixes the problem in the nscd/Makefile. I'll attach a patch
that makes it work for me.

Thanks
Comment 1 Greg Schafer 2005-03-23 05:49:31 IST
Created attachment 442 [details]
minor fix for nscd/Makefile
Comment 2 Ulrich Drepper 2005-04-29 02:09:08 IST
I've applied some patch although I have no sympathy for anybody using
--with-headers.  That option is really only for the initial port.
Comment 3 Greg Schafer 2005-07-17 05:36:29 IST
(In reply to comment #2)
> I've applied some patch although I have no sympathy for anybody using
> --with-headers.  That option is really only for the initial port.

Ulrich, thanks for fixing this. However, there is still a small problem. Those
lines need to be inside the

  ifeq (yes,$(have-selinux))

for the fix to be effective. It seems there is a mis-placed `endif'. I'll attach
a tiny patch to correct it.
Comment 4 Greg Schafer 2005-07-17 05:38:02 IST
Created attachment 555 [details]
another minor fix for nscd/Makefile
Comment 5 Ulrich Drepper 2005-07-20 18:10:48 IST
I see nothing wrong and your proposed patch is definitely wrong.  Excluding
sysincludes for nscd_stat has nothing to do with selinux, selinux-LIBS is empty
if have-selinux isn't defined.