On Fri, Aug 29, 2014 at 11:34:37AM +0200, Lukas Slebodnik wrote: > On (29/08/14 11:14), Sumit Bose wrote: > >On Thu, Aug 28, 2014 at 09:42:50AM +0200, Lukas Slebodnik wrote: > >> On (27/08/14 18:33), Sumit Bose wrote: > >> >On Wed, Aug 27, 2014 at 11:31:27AM +0200, Lukas Slebodnik wrote: > >> >> On (21/08/14 13:38), Sumit Bose wrote: > >> >> >On Thu, Aug 21, 2014 at 01:27:58PM +0200, Jakub Hrozek wrote: > >> >> >> On Wed, Aug 20, 2014 at 05:38:56PM +0200, Sumit Bose wrote: > >> >> >> > > > wbcGetgrnam and wbcGetgrnam have wrong comments, but this > >> >> >> > > > trivial bug is > >> >> >> > > > also in Samba. > >> >> >> > > > > >> >> >> > > > Are you sure the asprintf() call in wbcLookupName is safe? > >> >> >> > > > Could this > >> >> >> > > > enable someone to trash the stack with a long enough name? > >> >> >> > > > >> >> >> > > I added some checks to prevent this. > >> >> >> > >> >> >> For some reason I thought that asprintf allocates on the stack like > >> >> >> alloca and didn't see the call to free. In this case, I don't think > >> >> >> the > >> >> >> check is needed. > >> >> > > >> >> >I think the NULL checks still make sense and if you agree I would keep > >> >> >the others just as sanity checks. > >> >> > > >> >> > >> >> libwbclient is installed by default with make install > >> >> and there isn't way how to disable this behaviour. > >> >> Should we add possibility to build (or install) library optionaly? > >> >> It might help package maintainers. > >> > > >> >Do you think attached patch would work? > >> Yes, thank you > >> > >> >From b92a817a5b984216f85ceb89f60e554a50d1c2e5 Mon Sep 17 00:00:00 2001 > >> >From: Sumit Bose <sb...@redhat.com> > >> >Date: Wed, 27 Aug 2014 18:27:07 +0200 > >> >Subject: [PATCH] libwbclient: make build optional > >> > > >> >--- > >> > Makefile.am | 5 ++++- > >> > configure.ac | 1 + > >> > src/conf_macros.m4 | 16 ++++++++++++++++ > >> > 3 files changed, 21 insertions(+), 1 deletion(-) > >> > > >> >diff --git a/Makefile.am b/Makefile.am > >> >index 1b183d0..dd0ddb3 100644 > >> >--- a/Makefile.am > >> >+++ b/Makefile.am > >> >@@ -733,9 +733,12 @@ endif # BUILD_IFP > >> > lib_LTLIBRARIES = libipa_hbac.la \ > >> > libsss_idmap.la \ > >> > libsss_nss_idmap.la \ > >> >- libwbclient.la \ > >> > $(NULL) > >> > > >> >+if BUILD_LIBWBCLIENT > >> >+lib_LTLIBRARIES += libwbclient.la > >> >+endif #BUILD_LIBWBCLIENT > >> >+ > >> > pkgconfig_DATA += src/providers/ipa/ipa_hbac.pc > >> > libipa_hbac_la_DEPENDENCIES = src/providers/ipa/ipa_hbac.exports > >> > libipa_hbac_la_SOURCES = \ > >> > >> Almost ACK. > >> > >> wbclient.pc should not be installed if sssd is built without libwbclient. > > > >good catch, folded in, new version attached. > > > >bye, > >Sumit > > > >> > >> @@ -770,7 +770,11 @@ libsss_nss_idmap_la_LDFLAGS = \ > >> > >> dist_noinst_DATA += src/sss_client/idmap/sss_nss_idmap.exports > >> > >> + > >> +if BUILD_LIBWBCLIENT > >> pkgconfig_DATA += src/sss_client/libwbclient/wbclient.pc > >> +endif #BUILD_LIBWBCLIENT > >> + > >> EXTRA_libwbclient_la_DEPENDENCIES = > >> src/sss_client/libwbclient/wbclient.exports > >> libwbclient_la_SOURCES = \ > >> src/sss_client/libwbclient/wbc_guid.c \ > >> > >> LS > > >From 8c1de23bb1ffc739340931a02452af55fa1af516 Mon Sep 17 00:00:00 2001 > >From: Sumit Bose <sb...@redhat.com> > >Date: Wed, 27 Aug 2014 18:27:07 +0200 > >Subject: [PATCH] libwbclient: make build optional > > > >--- > > Makefile.am | 8 +++++++- > > configure.ac | 1 + > > src/conf_macros.m4 | 16 ++++++++++++++++ > > 3 files changed, 24 insertions(+), 1 deletion(-) > > > >diff --git a/Makefile.am b/Makefile.am > >index 1b183d0..cf46135 100644 > >--- a/Makefile.am > >+++ b/Makefile.am > > I am so sorry. First time, I used grep "libwbclient", therefore I didn't see > that there is also wbclient.h and It should not be installed without > libwbclient.
np, I should have thought of this before. Hopefully I moved everything needed in the if block. New version attached. bye, Sumit > > include_HEADERS = \ > src/providers/ipa/ipa_hbac.h \ > src/lib/idmap/sss_idmap.h \ > src/sss_client/idmap/sss_nss_idmap.h \ > src/sss_client/libwbclient/wbclient.h \ > ^^^^^^^^^^^ > $(NULL) > > LS > _______________________________________________ > sssd-devel mailing list > sssd-devel@lists.fedorahosted.org > https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
From 1728e8865175441ca94a050311e1aa91f5d51e64 Mon Sep 17 00:00:00 2001 From: Sumit Bose <sb...@redhat.com> Date: Wed, 27 Aug 2014 18:27:07 +0200 Subject: [PATCH] libwbclient: make build optional --- Makefile.am | 19 +++++++++++-------- configure.ac | 1 + src/conf_macros.m4 | 16 ++++++++++++++++ 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 01d1ff6..ce9063e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -745,7 +745,6 @@ endif # BUILD_IFP lib_LTLIBRARIES = libipa_hbac.la \ libsss_idmap.la \ libsss_nss_idmap.la \ - libwbclient.la \ $(NULL) pkgconfig_DATA += src/providers/ipa/ipa_hbac.pc @@ -787,7 +786,16 @@ libsss_nss_idmap_la_LDFLAGS = \ dist_noinst_DATA += src/sss_client/idmap/sss_nss_idmap.exports +include_HEADERS = \ + src/providers/ipa/ipa_hbac.h \ + src/lib/idmap/sss_idmap.h \ + src/sss_client/idmap/sss_nss_idmap.h \ + $(NULL) + +if BUILD_LIBWBCLIENT +lib_LTLIBRARIES += libwbclient.la pkgconfig_DATA += src/sss_client/libwbclient/wbclient.pc + EXTRA_libwbclient_la_DEPENDENCIES = src/sss_client/libwbclient/wbclient.exports libwbclient_la_SOURCES = \ src/sss_client/libwbclient/wbc_guid.c \ @@ -811,13 +819,8 @@ libwbclient_la_LDFLAGS = \ dist_noinst_DATA += src/sss_client/libwbclient/wbclient.exports - -include_HEADERS = \ - src/providers/ipa/ipa_hbac.h \ - src/lib/idmap/sss_idmap.h \ - src/sss_client/idmap/sss_nss_idmap.h \ - src/sss_client/libwbclient/wbclient.h \ - $(NULL) +include_HEADERS += src/sss_client/libwbclient/wbclient.h +endif #BUILD_LIBWBCLIENT if BUILD_IFP lib_LTLIBRARIES += libsss_simpleifp.la diff --git a/configure.ac b/configure.ac index 42d8e5a..8f3465e 100644 --- a/configure.ac +++ b/configure.ac @@ -132,6 +132,7 @@ WITH_SYSLOG WITH_SAMBA WITH_NFS WITH_NFS_LIB_PATH +WITH_LIBWBCLIENT m4_include([src/external/pkg.m4]) m4_include([src/external/libpopt.m4]) diff --git a/src/conf_macros.m4 b/src/conf_macros.m4 index 8f84794..c8fadd2 100644 --- a/src/conf_macros.m4 +++ b/src/conf_macros.m4 @@ -669,6 +669,22 @@ AC_DEFUN([WITH_IFP], AM_CONDITIONAL([BUILD_IFP], [test x"$with_infopipe" = xyes]) ]) +AC_DEFUN([WITH_LIBWBCLIENT], + [ AC_ARG_WITH([libwbclient], + [AC_HELP_STRING([--with-libwbclient], + [Whether to build SSSD implementation of libwbclient [yes]] + ) + ], + [with_libwbclient=$withval], + with_libwbclient=yes + ) + + if test x"$with_libwbclient" = xyes; then + AC_DEFINE(BUILD_LIBWBCLIENT, 1, [whether to build SSSD implementation of libwbclient]) + fi + AM_CONDITIONAL([BUILD_LIBWBCLIENT], [test x"$with_libwbclient" = xyes]) + ]) + AC_DEFUN([WITH_SAMBA], [ AC_ARG_WITH([samba], [AC_HELP_STRING([--with-samba], -- 1.8.3.1
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel