Skip to contentSkip to conversation

cifs-utils: make fails if keyutils isn't installed

DISCUSSION Frédéric L. W. Meunier 2 participants 2 messages Jan 9, 2012 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I moved from cifs-utils 5.0 to 5.2. I didn't have keyutils installed and the compilation failed because configure checks for its presence, but doesn't abort if it's missing, and make tries to link to it.

...
checking keyutils.h usability... no
checking keyutils.h presence... no
checking for keyutils.h... no
configure: WARNING: keyutils.h not found, consider installing keyutils-libs-devel. Disabling cifs.upcall.
configure: WARNING: keyutils.h not found, consider installing keyutils-libs-devel. Disabling cifs.idmap.
...

Makefile.in:

@CONFIG_CIFSACL_TRUE@getcifsacl_LDADD = -lkeyutils $(WINB_LDADD) @CONFIG_CIFSACL_TRUE@setcifsacl_LDADD = -lkeyutils $(WINB_LDADD)

Apparently, getcifsacl and setcifsacl don't use keyutils at all, but cifs-utils links to it ?

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 20120109124038.581218c9-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org

#3 lore raw

2012/1/9 Jeff Layton <[email protected]>:

Quoted 58 lines
Quoted 14 lines · On Mon, 9 Jan 2012 14:00:15 -0200 Frédéric L. W. Meunier…

I moved from cifs-utils 5.0 to 5.2. I didn't have keyutils installed and the compilation failed because configure checks for its presence, but doesn't abort if it's missing, and make tries to link to it.

...
checking keyutils.h usability... no
checking keyutils.h presence... no
checking for keyutils.h... no
configure: WARNING: keyutils.h not found, consider installing keyutils-libs-devel. Disabling cifs.upcall.
configure: WARNING: keyutils.h not found, consider installing keyutils-libs-devel. Disabling cifs.idmap.
...

Quoted 7 lines

Makefile.in:

@CONFIG_CIFSACL_TRUE@getcifsacl_LDADD = -lkeyutils $(WINB_LDADD) @CONFIG_CIFSACL_TRUE@setcifsacl_LDADD = -lkeyutils $(WINB_LDADD)

Apparently, getcifsacl and setcifsacl don't use keyutils at all, but cifs-utils links to it ?

Good catch. Does this patch fix it?

----------------------[snip]--------------------

[PATCH] get/setcifsacl: don't link in -lkeyutils

These binaries don't use keys API at all. There's no need to link in the keys library.

---
 Makefile.am |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
Makefile.am +0 -0
index cb20442..038cd0e 100644
@@ -55,12 +55,12 @@ endif

 if CONFIG_CIFSACL
 bin_PROGRAMS += getcifsacl
 getcifsacl_SOURCES = getcifsacl.c

Makefile.am +1 -1
-getcifsacl_LDADD = -lkeyutils $(WINB_LDADD)
+getcifsacl_LDADD = $(WINB_LDADD)

 man_MANS += getcifsacl.1

 bin_PROGRAMS += setcifsacl
 setcifsacl_SOURCES = setcifsacl.c

Makefile.am +1 -1
-setcifsacl_LDADD = -lkeyutils $(WINB_LDADD)
+setcifsacl_LDADD = $(WINB_LDADD)

 man_MANS += setcifsacl.1

Quoted 4 lines

 endif
--
1.7.7.4

Should have never listed keyutils library on the link line in the first place.