Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On (09/03/16 18:59), Martin Basti wrote: >On 09.03.2016 18:16, Alexander Bokovoy wrote: >>On Wed, 09 Mar 2016, Lukas Slebodnik wrote: >>>On (09/03/16 13:33), Alexander Bokovoy wrote: On Wed, 09 Mar 2016, Lukas Slebodnik wrote: >On (03/02/16 14:30), Lukas Slebodnik wrote: >>On (29/01/16 19:59), Alexander Bokovoy wrote: >>>On Fri, 29 Jan 2016, Lukas Slebodnik wrote: On (29/01/16 12:12), Lukas Slebodnik wrote: >ehlo, > >attached patch shoudl fix build on fedora-24. >It blocks static analysis scan. > >Even though it unblock build on fedora-24 >the solution is not ideal. It's possible that some changes >need to be done in samba side as well. >(missing prototypes for trim_string, smb_xstrdup > >LS BTW there is also another issue in IPA-SAM. The value of macro LDAP_PAGE_SIZE has changed and therefore there is a warning. ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 ^ In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 >>>This is something we should fix. I'll look at it once in Brno. >>Here is a related change in samba >>https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a >> >> >Please review attached patch. > >LS >From 770577899357a812475d06d1da74254e6f83205d Mon Sep 17 00:00:00 2001 >From: Lukas Slebodnik >Date: Wed, 9 Mar 2016 10:16:58 +0100 >Subject: [PATCH] ipa-sam: Change value of LDAP_PAGE_SIZE > >The value of LDAP_PAGE_SIZE was changed in samba-4.4 >and samba commit message says: "This matches Windows' Active Directory >maximum page size." >https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a > > >ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined >#define LDAP_PAGE_SIZE 1024 > >In file included from /usr/include/samba-4.0/smbldap.h:24:0, > from ipa_sam.c:31: >/usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of >the previous definition >#define LDAP_PAGE_SIZE 1000 >--- >daemons/ipa-sam/ipa_sam.c | 3 ++- >1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c >index >9216e63587995ef719015e34f96f48262eaf171f..dba7ba2c803ae384bedaed9ae874a6a01232abfb >100644 >--- a/daemons/ipa-sam/ipa_sam.c >+++ b/daemons/ipa-sam/ipa_sam.c >@@ -111,7 +111,8 @@ char *escape_ldap_string(TALLOC_CTX *mem_ctx, >const char *s); /* available in li >bool secrets_store(const char *key, const void *data, size_t size); >/* available in libpdb.so */ >void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct >unixid *unix_id); /* available in libsmbconf.so */ > >-#define LDAP_PAGE_SIZE 1024 >+#undef LDAP_PAGE_SIZE >+#define LDAP_PAGE_SIZE 1000 >#define LDAP_OBJ_SAMBASAMACCOUNT "ipaNTUserAttrs" >#define LDAP_OBJ_TRUSTED_DOMAIN "ipaNTTrustedDomain" >#define LDAP_OBJ_ID_OBJECT "ipaIDobject" >-- >2.7.2 > ACK but I wonder if we should be using the one defined by smbldap.h? >>>I checked header file on CentOS 7 and and it will work there as well. >>>Updated patch is attached. >>ACK. >> >Pushed to master: 0906cc28b8387a62945d2531dd19bef60f731364 > BTW if you wnat to get rid of warning on fedora 24 (freeipa-4.3) then it might be pushed there as well. But feel free to create ticket for it yourself. I'm happy with fixed warning on master LS -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On 09.03.2016 18:16, Alexander Bokovoy wrote: On Wed, 09 Mar 2016, Lukas Slebodnik wrote: On (09/03/16 13:33), Alexander Bokovoy wrote: On Wed, 09 Mar 2016, Lukas Slebodnik wrote: On (03/02/16 14:30), Lukas Slebodnik wrote: On (29/01/16 19:59), Alexander Bokovoy wrote: On Fri, 29 Jan 2016, Lukas Slebodnik wrote: On (29/01/16 12:12), Lukas Slebodnik wrote: ehlo, attached patch shoudl fix build on fedora-24. It blocks static analysis scan. Even though it unblock build on fedora-24 the solution is not ideal. It's possible that some changes need to be done in samba side as well. (missing prototypes for trim_string, smb_xstrdup LS BTW there is also another issue in IPA-SAM. The value of macro LDAP_PAGE_SIZE has changed and therefore there is a warning. ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 ^ In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 This is something we should fix. I'll look at it once in Brno. Here is a related change in samba https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a Please review attached patch. LS From 770577899357a812475d06d1da74254e6f83205d Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 9 Mar 2016 10:16:58 +0100 Subject: [PATCH] ipa-sam: Change value of LDAP_PAGE_SIZE The value of LDAP_PAGE_SIZE was changed in samba-4.4 and samba commit message says: "This matches Windows' Active Directory maximum page size." https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 --- daemons/ipa-sam/ipa_sam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 9216e63587995ef719015e34f96f48262eaf171f..dba7ba2c803ae384bedaed9ae874a6a01232abfb 100644 --- a/daemons/ipa-sam/ipa_sam.c +++ b/daemons/ipa-sam/ipa_sam.c @@ -111,7 +111,8 @@ char *escape_ldap_string(TALLOC_CTX *mem_ctx, const char *s); /* available in li bool secrets_store(const char *key, const void *data, size_t size); /* available in libpdb.so */ void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_id); /* available in libsmbconf.so */ -#define LDAP_PAGE_SIZE 1024 +#undef LDAP_PAGE_SIZE +#define LDAP_PAGE_SIZE 1000 #define LDAP_OBJ_SAMBASAMACCOUNT "ipaNTUserAttrs" #define LDAP_OBJ_TRUSTED_DOMAIN "ipaNTTrustedDomain" #define LDAP_OBJ_ID_OBJECT "ipaIDobject" -- 2.7.2 ACK but I wonder if we should be using the one defined by smbldap.h? I checked header file on CentOS 7 and and it will work there as well. Updated patch is attached. ACK. Pushed to master: 0906cc28b8387a62945d2531dd19bef60f731364 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On Wed, 09 Mar 2016, Lukas Slebodnik wrote: On (09/03/16 13:33), Alexander Bokovoy wrote: On Wed, 09 Mar 2016, Lukas Slebodnik wrote: On (03/02/16 14:30), Lukas Slebodnik wrote: On (29/01/16 19:59), Alexander Bokovoy wrote: On Fri, 29 Jan 2016, Lukas Slebodnik wrote: On (29/01/16 12:12), Lukas Slebodnik wrote: ehlo, attached patch shoudl fix build on fedora-24. It blocks static analysis scan. Even though it unblock build on fedora-24 the solution is not ideal. It's possible that some changes need to be done in samba side as well. (missing prototypes for trim_string, smb_xstrdup LS BTW there is also another issue in IPA-SAM. The value of macro LDAP_PAGE_SIZE has changed and therefore there is a warning. ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 ^ In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 This is something we should fix. I'll look at it once in Brno. Here is a related change in samba https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a Please review attached patch. LS From 770577899357a812475d06d1da74254e6f83205d Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 9 Mar 2016 10:16:58 +0100 Subject: [PATCH] ipa-sam: Change value of LDAP_PAGE_SIZE The value of LDAP_PAGE_SIZE was changed in samba-4.4 and samba commit message says: "This matches Windows' Active Directory maximum page size." https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 --- daemons/ipa-sam/ipa_sam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 9216e63587995ef719015e34f96f48262eaf171f..dba7ba2c803ae384bedaed9ae874a6a01232abfb 100644 --- a/daemons/ipa-sam/ipa_sam.c +++ b/daemons/ipa-sam/ipa_sam.c @@ -111,7 +111,8 @@ char *escape_ldap_string(TALLOC_CTX *mem_ctx, const char *s); /* available in li bool secrets_store(const char *key, const void *data, size_t size); /* available in libpdb.so */ void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_id); /* available in libsmbconf.so */ -#define LDAP_PAGE_SIZE 1024 +#undef LDAP_PAGE_SIZE +#define LDAP_PAGE_SIZE 1000 #define LDAP_OBJ_SAMBASAMACCOUNT "ipaNTUserAttrs" #define LDAP_OBJ_TRUSTED_DOMAIN "ipaNTTrustedDomain" #define LDAP_OBJ_ID_OBJECT "ipaIDobject" -- 2.7.2 ACK but I wonder if we should be using the one defined by smbldap.h? I checked header file on CentOS 7 and and it will work there as well. Updated patch is attached. ACK. -- / Alexander Bokovoy -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On (09/03/16 13:33), Alexander Bokovoy wrote: >On Wed, 09 Mar 2016, Lukas Slebodnik wrote: >>On (03/02/16 14:30), Lukas Slebodnik wrote: >>>On (29/01/16 19:59), Alexander Bokovoy wrote: On Fri, 29 Jan 2016, Lukas Slebodnik wrote: >On (29/01/16 12:12), Lukas Slebodnik wrote: >>ehlo, >> >>attached patch shoudl fix build on fedora-24. >>It blocks static analysis scan. >> >>Even though it unblock build on fedora-24 >>the solution is not ideal. It's possible that some changes >>need to be done in samba side as well. >>(missing prototypes for trim_string, smb_xstrdup >> >>LS > >BTW there is also another issue in IPA-SAM. >The value of macro LDAP_PAGE_SIZE has changed >and therefore there is a warning. > >ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined >#define LDAP_PAGE_SIZE 1024 >^ >In file included from /usr/include/samba-4.0/smbldap.h:24:0, > from ipa_sam.c:31: >/usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the >previous definition >#define LDAP_PAGE_SIZE 1000 This is something we should fix. I'll look at it once in Brno. >>>Here is a related change in samba >>>https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a >>> >>Please review attached patch. >> >>LS > >>From 770577899357a812475d06d1da74254e6f83205d Mon Sep 17 00:00:00 2001 >>From: Lukas Slebodnik >>Date: Wed, 9 Mar 2016 10:16:58 +0100 >>Subject: [PATCH] ipa-sam: Change value of LDAP_PAGE_SIZE >> >>The value of LDAP_PAGE_SIZE was changed in samba-4.4 >>and samba commit message says: "This matches Windows' Active Directory >>maximum page size." >>https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a >> >>ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined >>#define LDAP_PAGE_SIZE 1024 >> >>In file included from /usr/include/samba-4.0/smbldap.h:24:0, >>from ipa_sam.c:31: >>/usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the >>previous definition >>#define LDAP_PAGE_SIZE 1000 >>--- >>daemons/ipa-sam/ipa_sam.c | 3 ++- >>1 file changed, 2 insertions(+), 1 deletion(-) >> >>diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c >>index >>9216e63587995ef719015e34f96f48262eaf171f..dba7ba2c803ae384bedaed9ae874a6a01232abfb >> 100644 >>--- a/daemons/ipa-sam/ipa_sam.c >>+++ b/daemons/ipa-sam/ipa_sam.c >>@@ -111,7 +111,8 @@ char *escape_ldap_string(TALLOC_CTX *mem_ctx, const char >>*s); /* available in li >>bool secrets_store(const char *key, const void *data, size_t size); /* >>available in libpdb.so */ >>void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid >>*unix_id); /* available in libsmbconf.so */ >> >>-#define LDAP_PAGE_SIZE 1024 >>+#undef LDAP_PAGE_SIZE >>+#define LDAP_PAGE_SIZE 1000 >>#define LDAP_OBJ_SAMBASAMACCOUNT "ipaNTUserAttrs" >>#define LDAP_OBJ_TRUSTED_DOMAIN "ipaNTTrustedDomain" >>#define LDAP_OBJ_ID_OBJECT "ipaIDobject" >>-- >>2.7.2 >> >ACK but I wonder if we should be using the one defined by smbldap.h? > I checked header file on CentOS 7 and and it will work there as well. Updated patch is attached. LS >From e80014f6c1d4a4cc19f135a797c3f0823ad388c1 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 9 Mar 2016 10:16:58 +0100 Subject: [PATCH] ipa-sam: Do not redefine LDAP_PAGE_SIZE The value of LDAP_PAGE_SIZE was changed in samba-4.4 and it caused warning because it's already defined in samba header files ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 --- daemons/ipa-sam/ipa_sam.c | 1 - 1 file changed, 1 deletion(-) diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 9216e63587995ef719015e34f96f48262eaf171f..4c1fda5f82b43f69929613f9938410b32cff31e7 100644 --- a/daemons/ipa-sam/ipa_sam.c +++ b/daemons/ipa-sam/ipa_sam.c @@ -111,7 +111,6 @@ char *escape_ldap_string(TALLOC_CTX *mem_ctx, const char *s); /* available in li bool secrets_store(const char *key, const void *data, size_t size); /* available in libpdb.so */ void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_id); /* available in libsmbconf.so */ -#define LDAP_PAGE_SIZE 1024 #define LDAP_OBJ_SAMBASAMACCOUNT "ipaNTUserAttrs" #define LDAP_OBJ_TRUSTED_DOMAIN "ipaNTTrustedDomain" #define LDAP_OBJ_ID_OBJECT "ipaIDobject" -- 2.7.2 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On (09/03/16 13:33), Alexander Bokovoy wrote: >On Wed, 09 Mar 2016, Lukas Slebodnik wrote: >>On (03/02/16 14:30), Lukas Slebodnik wrote: >>>On (29/01/16 19:59), Alexander Bokovoy wrote: On Fri, 29 Jan 2016, Lukas Slebodnik wrote: >On (29/01/16 12:12), Lukas Slebodnik wrote: >>ehlo, >> >>attached patch shoudl fix build on fedora-24. >>It blocks static analysis scan. >> >>Even though it unblock build on fedora-24 >>the solution is not ideal. It's possible that some changes >>need to be done in samba side as well. >>(missing prototypes for trim_string, smb_xstrdup >> >>LS > >BTW there is also another issue in IPA-SAM. >The value of macro LDAP_PAGE_SIZE has changed >and therefore there is a warning. > >ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined >#define LDAP_PAGE_SIZE 1024 >^ >In file included from /usr/include/samba-4.0/smbldap.h:24:0, > from ipa_sam.c:31: >/usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the >previous definition >#define LDAP_PAGE_SIZE 1000 This is something we should fix. I'll look at it once in Brno. >>>Here is a related change in samba >>>https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a >>> >>Please review attached patch. >> >>LS > >>From 770577899357a812475d06d1da74254e6f83205d Mon Sep 17 00:00:00 2001 >>From: Lukas Slebodnik >>Date: Wed, 9 Mar 2016 10:16:58 +0100 >>Subject: [PATCH] ipa-sam: Change value of LDAP_PAGE_SIZE >> >>The value of LDAP_PAGE_SIZE was changed in samba-4.4 >>and samba commit message says: "This matches Windows' Active Directory >>maximum page size." >>https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a >> >>ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined >>#define LDAP_PAGE_SIZE 1024 >> >>In file included from /usr/include/samba-4.0/smbldap.h:24:0, >>from ipa_sam.c:31: >>/usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the >>previous definition >>#define LDAP_PAGE_SIZE 1000 >>--- >>daemons/ipa-sam/ipa_sam.c | 3 ++- >>1 file changed, 2 insertions(+), 1 deletion(-) >> >>diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c >>index >>9216e63587995ef719015e34f96f48262eaf171f..dba7ba2c803ae384bedaed9ae874a6a01232abfb >> 100644 >>--- a/daemons/ipa-sam/ipa_sam.c >>+++ b/daemons/ipa-sam/ipa_sam.c >>@@ -111,7 +111,8 @@ char *escape_ldap_string(TALLOC_CTX *mem_ctx, const char >>*s); /* available in li >>bool secrets_store(const char *key, const void *data, size_t size); /* >>available in libpdb.so */ >>void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid >>*unix_id); /* available in libsmbconf.so */ >> >>-#define LDAP_PAGE_SIZE 1024 >>+#undef LDAP_PAGE_SIZE >>+#define LDAP_PAGE_SIZE 1000 >>#define LDAP_OBJ_SAMBASAMACCOUNT "ipaNTUserAttrs" >>#define LDAP_OBJ_TRUSTED_DOMAIN "ipaNTTrustedDomain" >>#define LDAP_OBJ_ID_OBJECT "ipaIDobject" >>-- >>2.7.2 >> >ACK but I wonder if we should be using the one defined by smbldap.h? > It might be better. I will test it and send patch soon. LS -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On Wed, 09 Mar 2016, Lukas Slebodnik wrote: On (03/02/16 14:30), Lukas Slebodnik wrote: On (29/01/16 19:59), Alexander Bokovoy wrote: On Fri, 29 Jan 2016, Lukas Slebodnik wrote: On (29/01/16 12:12), Lukas Slebodnik wrote: ehlo, attached patch shoudl fix build on fedora-24. It blocks static analysis scan. Even though it unblock build on fedora-24 the solution is not ideal. It's possible that some changes need to be done in samba side as well. (missing prototypes for trim_string, smb_xstrdup LS BTW there is also another issue in IPA-SAM. The value of macro LDAP_PAGE_SIZE has changed and therefore there is a warning. ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 ^ In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 This is something we should fix. I'll look at it once in Brno. Here is a related change in samba https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a Please review attached patch. LS From 770577899357a812475d06d1da74254e6f83205d Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 9 Mar 2016 10:16:58 +0100 Subject: [PATCH] ipa-sam: Change value of LDAP_PAGE_SIZE The value of LDAP_PAGE_SIZE was changed in samba-4.4 and samba commit message says: "This matches Windows' Active Directory maximum page size." https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 --- daemons/ipa-sam/ipa_sam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 9216e63587995ef719015e34f96f48262eaf171f..dba7ba2c803ae384bedaed9ae874a6a01232abfb 100644 --- a/daemons/ipa-sam/ipa_sam.c +++ b/daemons/ipa-sam/ipa_sam.c @@ -111,7 +111,8 @@ char *escape_ldap_string(TALLOC_CTX *mem_ctx, const char *s); /* available in li bool secrets_store(const char *key, const void *data, size_t size); /* available in libpdb.so */ void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_id); /* available in libsmbconf.so */ -#define LDAP_PAGE_SIZE 1024 +#undef LDAP_PAGE_SIZE +#define LDAP_PAGE_SIZE 1000 #define LDAP_OBJ_SAMBASAMACCOUNT "ipaNTUserAttrs" #define LDAP_OBJ_TRUSTED_DOMAIN "ipaNTTrustedDomain" #define LDAP_OBJ_ID_OBJECT "ipaIDobject" -- 2.7.2 ACK but I wonder if we should be using the one defined by smbldap.h? -- / Alexander Bokovoy -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On (03/02/16 14:30), Lukas Slebodnik wrote: >On (29/01/16 19:59), Alexander Bokovoy wrote: >>On Fri, 29 Jan 2016, Lukas Slebodnik wrote: >>>On (29/01/16 12:12), Lukas Slebodnik wrote: ehlo, attached patch shoudl fix build on fedora-24. It blocks static analysis scan. Even though it unblock build on fedora-24 the solution is not ideal. It's possible that some changes need to be done in samba side as well. (missing prototypes for trim_string, smb_xstrdup LS >>> >>>BTW there is also another issue in IPA-SAM. >>>The value of macro LDAP_PAGE_SIZE has changed >>>and therefore there is a warning. >>> >>>ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined >>>#define LDAP_PAGE_SIZE 1024 >>>^ >>>In file included from /usr/include/samba-4.0/smbldap.h:24:0, >>>from ipa_sam.c:31: >>>/usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the >>>previous definition >>>#define LDAP_PAGE_SIZE 1000 >>This is something we should fix. I'll look at it once in Brno. >Here is a related change in samba >https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a > Please review attached patch. LS >From 770577899357a812475d06d1da74254e6f83205d Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 9 Mar 2016 10:16:58 +0100 Subject: [PATCH] ipa-sam: Change value of LDAP_PAGE_SIZE The value of LDAP_PAGE_SIZE was changed in samba-4.4 and samba commit message says: "This matches Windows' Active Directory maximum page size." https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 --- daemons/ipa-sam/ipa_sam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 9216e63587995ef719015e34f96f48262eaf171f..dba7ba2c803ae384bedaed9ae874a6a01232abfb 100644 --- a/daemons/ipa-sam/ipa_sam.c +++ b/daemons/ipa-sam/ipa_sam.c @@ -111,7 +111,8 @@ char *escape_ldap_string(TALLOC_CTX *mem_ctx, const char *s); /* available in li bool secrets_store(const char *key, const void *data, size_t size); /* available in libpdb.so */ void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_id); /* available in libsmbconf.so */ -#define LDAP_PAGE_SIZE 1024 +#undef LDAP_PAGE_SIZE +#define LDAP_PAGE_SIZE 1000 #define LDAP_OBJ_SAMBASAMACCOUNT "ipaNTUserAttrs" #define LDAP_OBJ_TRUSTED_DOMAIN "ipaNTTrustedDomain" #define LDAP_OBJ_ID_OBJECT "ipaIDobject" -- 2.7.2 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On (29/01/16 19:59), Alexander Bokovoy wrote: >On Fri, 29 Jan 2016, Lukas Slebodnik wrote: >>On (29/01/16 12:12), Lukas Slebodnik wrote: >>>ehlo, >>> >>>attached patch shoudl fix build on fedora-24. >>>It blocks static analysis scan. >>> >>>Even though it unblock build on fedora-24 >>>the solution is not ideal. It's possible that some changes >>>need to be done in samba side as well. >>>(missing prototypes for trim_string, smb_xstrdup >>> >>>LS >> >>BTW there is also another issue in IPA-SAM. >>The value of macro LDAP_PAGE_SIZE has changed >>and therefore there is a warning. >> >>ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined >>#define LDAP_PAGE_SIZE 1024 >>^ >>In file included from /usr/include/samba-4.0/smbldap.h:24:0, >>from ipa_sam.c:31: >>/usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the >>previous definition >>#define LDAP_PAGE_SIZE 1000 >This is something we should fix. I'll look at it once in Brno. Here is a related change in samba https://github.com/samba-team/samba/commit/8c2609f3186d40afb5954737dc174ce190cd368a LS -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On 02/02/2016 05:54 PM, Alexander Bokovoy wrote: On Tue, 02 Feb 2016, Lukas Slebodnik wrote: On (29/01/16 12:12), Lukas Slebodnik wrote: ehlo, attached patch shoudl fix build on fedora-24. It blocks static analysis scan. Even though it unblock build on fedora-24 the solution is not ideal. It's possible that some changes need to be done in samba side as well. (missing prototypes for trim_string, smb_xstrdup LS From f9057ca98557094a4db84ac072ee9efd02a4ff79 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Fri, 29 Jan 2016 10:40:18 +0100 Subject: [PATCH 1/3] IPA-SAM: Fix build with samba 4.4 samba_util.h is not shipped with samba-4.4 and it was indirectly included by "ndr.h" Some functions have prototypes in different header file "util/talloc_stack.h" and other does not have declarations in other header file. But they are still part of libsamba-util.so sh$ objdump -T /usr/lib64/libsamba-util.so.0.0.1 | grep -E "trim_s|xstrdup" 00022200 gDF .text 001f SAMBA_UTIL_0.0.1 smb_xstrdup 000223b0 gDF .text 019d SAMBA_UTIL_0.0.1 trim_string ipa_sam.c: In function 'ldapsam_uid_to_sid': ipa_sam.c:836:24: warning: implicit declaration of function 'talloc_stackframe' [-Wimplicit-function-declaration] TALLOC_CTX *tmp_ctx = talloc_stackframe(); ^ ipa_sam.c: In function 'pdb_init_ipasam': ipa_sam.c:4493:2: warning: implicit declaration of function 'trim_string' [-Wimplicit-function-declaration] trim_string( uri, "\"", "\"" ); ^ ipa_sam.c:4580:26: warning: implicit declaration of function 'smb_xstrdup' [-Wimplicit-function-declaration] ldap_state->domain_dn = smb_xstrdup(dn); ^ --- daemons/ipa-sam/ipa_sam.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 7274d600b532f101e8a614a47eea7632ed70..871775b0a19e9c273652ff7a0b497d86bb866aa6 100644 --- a/daemons/ipa-sam/ipa_sam.c +++ b/daemons/ipa-sam/ipa_sam.c @@ -19,6 +19,12 @@ #include #include #include +#include + +#ifndef _SAMBA_UTIL_H_ +bool trim_string(char *s, const char *front, const char *back); +char *smb_xstrdup(const char *s); +#endif Bump, it would be good to unblock static analysis scans. Yes, ACK. Pushed to: master: 017b343e13bbfdd0d9951417be8dac4614cb1416 ipa-4-3: 69cc457504306ec1f90d844efa1e4b422564f06d -- Petr Vobornik -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On Tue, 02 Feb 2016, Lukas Slebodnik wrote: On (29/01/16 12:12), Lukas Slebodnik wrote: ehlo, attached patch shoudl fix build on fedora-24. It blocks static analysis scan. Even though it unblock build on fedora-24 the solution is not ideal. It's possible that some changes need to be done in samba side as well. (missing prototypes for trim_string, smb_xstrdup LS From f9057ca98557094a4db84ac072ee9efd02a4ff79 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Fri, 29 Jan 2016 10:40:18 +0100 Subject: [PATCH 1/3] IPA-SAM: Fix build with samba 4.4 samba_util.h is not shipped with samba-4.4 and it was indirectly included by "ndr.h" Some functions have prototypes in different header file "util/talloc_stack.h" and other does not have declarations in other header file. But they are still part of libsamba-util.so sh$ objdump -T /usr/lib64/libsamba-util.so.0.0.1 | grep -E "trim_s|xstrdup" 00022200 gDF .text 001f SAMBA_UTIL_0.0.1 smb_xstrdup 000223b0 gDF .text 019d SAMBA_UTIL_0.0.1 trim_string ipa_sam.c: In function 'ldapsam_uid_to_sid': ipa_sam.c:836:24: warning: implicit declaration of function 'talloc_stackframe' [-Wimplicit-function-declaration] TALLOC_CTX *tmp_ctx = talloc_stackframe(); ^ ipa_sam.c: In function 'pdb_init_ipasam': ipa_sam.c:4493:2: warning: implicit declaration of function 'trim_string' [-Wimplicit-function-declaration] trim_string( uri, "\"", "\"" ); ^ ipa_sam.c:4580:26: warning: implicit declaration of function 'smb_xstrdup' [-Wimplicit-function-declaration] ldap_state->domain_dn = smb_xstrdup(dn); ^ --- daemons/ipa-sam/ipa_sam.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 7274d600b532f101e8a614a47eea7632ed70..871775b0a19e9c273652ff7a0b497d86bb866aa6 100644 --- a/daemons/ipa-sam/ipa_sam.c +++ b/daemons/ipa-sam/ipa_sam.c @@ -19,6 +19,12 @@ #include #include #include +#include + +#ifndef _SAMBA_UTIL_H_ +bool trim_string(char *s, const char *front, const char *back); +char *smb_xstrdup(const char *s); +#endif Bump, it would be good to unblock static analysis scans. Yes, ACK. -- / Alexander Bokovoy -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On (29/01/16 12:12), Lukas Slebodnik wrote: >ehlo, > >attached patch shoudl fix build on fedora-24. >It blocks static analysis scan. > >Even though it unblock build on fedora-24 >the solution is not ideal. It's possible that some changes >need to be done in samba side as well. >(missing prototypes for trim_string, smb_xstrdup > >LS >>From f9057ca98557094a4db84ac072ee9efd02a4ff79 Mon Sep 17 00:00:00 2001 >From: Lukas Slebodnik >Date: Fri, 29 Jan 2016 10:40:18 +0100 >Subject: [PATCH 1/3] IPA-SAM: Fix build with samba 4.4 > >samba_util.h is not shipped with samba-4.4 >and it was indirectly included by "ndr.h" > >Some functions have prototypes in different header file >"util/talloc_stack.h" and other does not have declarations >in other header file. But they are still part of libsamba-util.so > >sh$ objdump -T /usr/lib64/libsamba-util.so.0.0.1 | grep -E "trim_s|xstrdup" >00022200 gDF .text 001f SAMBA_UTIL_0.0.1 smb_xstrdup >000223b0 gDF .text 019d SAMBA_UTIL_0.0.1 trim_string > >ipa_sam.c: In function 'ldapsam_uid_to_sid': >ipa_sam.c:836:24: warning: implicit declaration of function 'talloc_stackframe' > [-Wimplicit-function-declaration] > TALLOC_CTX *tmp_ctx = talloc_stackframe(); >^ >ipa_sam.c: In function 'pdb_init_ipasam': >ipa_sam.c:4493:2: warning: implicit declaration of function 'trim_string' > [-Wimplicit-function-declaration] > trim_string( uri, "\"", "\"" ); > ^ >ipa_sam.c:4580:26: warning: implicit declaration of function 'smb_xstrdup' > [-Wimplicit-function-declaration] > ldap_state->domain_dn = smb_xstrdup(dn); > ^ >--- > daemons/ipa-sam/ipa_sam.c | 6 ++ > 1 file changed, 6 insertions(+) > >diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c >index >7274d600b532f101e8a614a47eea7632ed70..871775b0a19e9c273652ff7a0b497d86bb866aa6 > 100644 >--- a/daemons/ipa-sam/ipa_sam.c >+++ b/daemons/ipa-sam/ipa_sam.c >@@ -19,6 +19,12 @@ > #include > #include > #include >+#include >+ >+#ifndef _SAMBA_UTIL_H_ >+bool trim_string(char *s, const char *front, const char *back); >+char *smb_xstrdup(const char *s); >+#endif Bump, it would be good to unblock static analysis scans. LS -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On (29/01/16 12:12), Lukas Slebodnik wrote: >ehlo, > >attached patch shoudl fix build on fedora-24. >It blocks static analysis scan. > >Even though it unblock build on fedora-24 >the solution is not ideal. It's possible that some changes >need to be done in samba side as well. >(missing prototypes for trim_string, smb_xstrdup > >LS >>From f9057ca98557094a4db84ac072ee9efd02a4ff79 Mon Sep 17 00:00:00 2001 >From: Lukas Slebodnik >Date: Fri, 29 Jan 2016 10:40:18 +0100 >Subject: [PATCH 1/3] IPA-SAM: Fix build with samba 4.4 > >samba_util.h is not shipped with samba-4.4 >and it was indirectly included by "ndr.h" > I checked the samba 4.4 release notes and they intentionaly removed samba_util.h @see https://github.com/samba-team/samba/blob/master/WHATSNEW.txt#L191 REMOVED FEATURES Public headers -- Several public headers are not installed any longer. They are made for internal use only. More public headers will very likely be removed in future releases. The following headers are not installed any longer: dlinklist.h, gen_ndr/epmapper.h, gen_ndr/mgmt.h, gen_ndr/ndr_atsvc_c.h, gen_ndr/ndr_epmapper_c.h, gen_ndr/ndr_epmapper.h, gen_ndr/ndr_mgmt_c.h, gen_ndr/ndr_mgmt.h,gensec.h, ldap_errors.h, ldap_message.h, ldap_ndr.h, ldap-util.h, pytalloc.h, read_smb.h, registry.h, roles.h, samba_util.h, LS -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On Fri, 29 Jan 2016, Lukas Slebodnik wrote: On (29/01/16 12:12), Lukas Slebodnik wrote: ehlo, attached patch shoudl fix build on fedora-24. It blocks static analysis scan. Even though it unblock build on fedora-24 the solution is not ideal. It's possible that some changes need to be done in samba side as well. (missing prototypes for trim_string, smb_xstrdup LS BTW there is also another issue in IPA-SAM. The value of macro LDAP_PAGE_SIZE has changed and therefore there is a warning. ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 ^ In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 This is something we should fix. I'll look at it once in Brno. -- / Alexander Bokovoy -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
On (29/01/16 12:12), Lukas Slebodnik wrote: >ehlo, > >attached patch shoudl fix build on fedora-24. >It blocks static analysis scan. > >Even though it unblock build on fedora-24 >the solution is not ideal. It's possible that some changes >need to be done in samba side as well. >(missing prototypes for trim_string, smb_xstrdup > >LS BTW there is also another issue in IPA-SAM. The value of macro LDAP_PAGE_SIZE has changed and therefore there is a warning. ipa_sam.c:114:0: warning: "LDAP_PAGE_SIZE" redefined #define LDAP_PAGE_SIZE 1024 ^ In file included from /usr/include/samba-4.0/smbldap.h:24:0, from ipa_sam.c:31: /usr/include/samba-4.0/smb_ldap.h:81:0: note: this is the location of the previous definition #define LDAP_PAGE_SIZE 1000 LS -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [PATCH] IPA-SAM: Fix build with samba 4.4
ehlo, attached patch shoudl fix build on fedora-24. It blocks static analysis scan. Even though it unblock build on fedora-24 the solution is not ideal. It's possible that some changes need to be done in samba side as well. (missing prototypes for trim_string, smb_xstrdup LS >From f9057ca98557094a4db84ac072ee9efd02a4ff79 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Fri, 29 Jan 2016 10:40:18 +0100 Subject: [PATCH 1/3] IPA-SAM: Fix build with samba 4.4 samba_util.h is not shipped with samba-4.4 and it was indirectly included by "ndr.h" Some functions have prototypes in different header file "util/talloc_stack.h" and other does not have declarations in other header file. But they are still part of libsamba-util.so sh$ objdump -T /usr/lib64/libsamba-util.so.0.0.1 | grep -E "trim_s|xstrdup" 00022200 gDF .text 001f SAMBA_UTIL_0.0.1 smb_xstrdup 000223b0 gDF .text 019d SAMBA_UTIL_0.0.1 trim_string ipa_sam.c: In function 'ldapsam_uid_to_sid': ipa_sam.c:836:24: warning: implicit declaration of function 'talloc_stackframe' [-Wimplicit-function-declaration] TALLOC_CTX *tmp_ctx = talloc_stackframe(); ^ ipa_sam.c: In function 'pdb_init_ipasam': ipa_sam.c:4493:2: warning: implicit declaration of function 'trim_string' [-Wimplicit-function-declaration] trim_string( uri, "\"", "\"" ); ^ ipa_sam.c:4580:26: warning: implicit declaration of function 'smb_xstrdup' [-Wimplicit-function-declaration] ldap_state->domain_dn = smb_xstrdup(dn); ^ --- daemons/ipa-sam/ipa_sam.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 7274d600b532f101e8a614a47eea7632ed70..871775b0a19e9c273652ff7a0b497d86bb866aa6 100644 --- a/daemons/ipa-sam/ipa_sam.c +++ b/daemons/ipa-sam/ipa_sam.c @@ -19,6 +19,12 @@ #include #include #include +#include + +#ifndef _SAMBA_UTIL_H_ +bool trim_string(char *s, const char *front, const char *back); +char *smb_xstrdup(const char *s); +#endif #include #include -- 2.5.0 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code