svn commit: samba r18065 - in branches/SAMBA_3_0/source: .
Author: metze Date: 2006-09-05 06:57:13 + (Tue, 05 Sep 2006) New Revision: 18065 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18065 Log: build talloctort as part of 'make torture' metze Modified: branches/SAMBA_3_0/source/Makefile.in Changeset: Modified: branches/SAMBA_3_0/source/Makefile.in === --- branches/SAMBA_3_0/source/Makefile.in 2006-09-05 06:40:39 UTC (rev 18064) +++ branches/SAMBA_3_0/source/Makefile.in 2006-09-05 06:57:13 UTC (rev 18065) @@ -156,7 +156,7 @@ TORTURE_PROGS = bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ \ bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ \ bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ \ - bin/[EMAIL PROTECTED]@ + bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ BIN_PROGS = $(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) @EXTRA_BIN_PROGS@
svn commit: samba r18064 - in branches/SAMBA_4_0/source/lib/talloc: .
Author: metze Date: 2006-09-05 06:40:39 + (Tue, 05 Sep 2006) New Revision: 18064 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18064 Log: merge from samba3 metze Modified: branches/SAMBA_4_0/source/lib/talloc/testsuite.c Changeset: Modified: branches/SAMBA_4_0/source/lib/talloc/testsuite.c === --- branches/SAMBA_4_0/source/lib/talloc/testsuite.c2006-09-05 06:32:46 UTC (rev 18063) +++ branches/SAMBA_4_0/source/lib/talloc/testsuite.c2006-09-05 06:40:39 UTC (rev 18064) @@ -609,19 +609,22 @@ return True; } +struct el2 { + const char *name; +}; +struct el1 { + int count; + struct el2 **list, **list2, **list3; +}; + /* test realloc with a child */ static BOOL test_realloc_child(void) { void *root; - struct el1 { - int count; - struct el2 { - const char *name; - } **list, **list2, **list3; - } *el1; + struct el1 *el1; struct el2 *el2; printf("TESTING REALLOC WITH CHILD\n");
svn commit: samba r18063 - in branches/SAMBA_3_0/source: libads nsswitch
Author: jra Date: 2006-09-05 06:32:46 + (Tue, 05 Sep 2006) New Revision: 18063 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18063 Log: When we get a successful connection using ADS, cache the SAF name under both the domain name and the realm name, as we could be looking up under both. Jerry please check. Jeremy. Modified: branches/SAMBA_3_0/source/libads/ldap.c branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c Changeset: Modified: branches/SAMBA_3_0/source/libads/ldap.c === --- branches/SAMBA_3_0/source/libads/ldap.c 2006-09-05 05:28:31 UTC (rev 18062) +++ branches/SAMBA_3_0/source/libads/ldap.c 2006-09-05 06:32:46 UTC (rev 18063) @@ -393,8 +393,9 @@ return ADS_ERROR(LDAP_OPERATIONS_ERROR); } - /* cache the successful connection */ + /* cache the successful connection for workgroup and realm */ saf_store( ads->server.workgroup, inet_ntoa(ads->ldap_ip)); + saf_store( ads->server.realm, inet_ntoa(ads->ldap_ip)); ldap_set_option(ads->ld, LDAP_OPT_PROTOCOL_VERSION, &version); Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2006-09-05 05:28:31 UTC (rev 18062) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2006-09-05 06:32:46 UTC (rev 18063) @@ -363,6 +363,9 @@ /* cache the server name for later connections */ saf_store( domain->name, (*cli)->desthost ); + if (domain->alt_name) { + saf_store( domain->alt_name, (*cli)->desthost ); + } if (!cli_send_tconX(*cli, "IPC$", "IPC", "", 0)) {
svn commit: samba r18062 - in branches/SAMBA_3_0/source/nsswitch: .
Author: jra Date: 2006-09-05 05:28:31 + (Tue, 05 Sep 2006) New Revision: 18062 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18062 Log: Fix to ensure the name used by pam matches the name that will be returned by winbindd. This (should) fix the bug where the user logs in with DOMAIN\user but winbindd returns only "user" for the username due to 'winbind use default domain' being set. Jeremy. Modified: branches/SAMBA_3_0/source/nsswitch/pam_winbind.c branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/pam_winbind.c === --- branches/SAMBA_3_0/source/nsswitch/pam_winbind.c2006-09-05 04:58:23 UTC (rev 18061) +++ branches/SAMBA_3_0/source/nsswitch/pam_winbind.c2006-09-05 05:28:31 UTC (rev 18062) @@ -344,7 +344,8 @@ const char *member, const char *cctype, int process_result, - time_t *pwd_last_set) + time_t *pwd_last_set, + char **user_ret) { struct winbindd_request request; struct winbindd_response response; @@ -388,6 +389,11 @@ request.flags |= WBFLAG_PAM_CACHED_LOGIN; } + if (user_ret) { + *user_ret = NULL; + request.flags |= WBFLAG_PAM_UNIX_NAME; + } + if (cctype != NULL) { strncpy(request.data.auth.krb5_cc_type, cctype, sizeof(request.data.auth.krb5_cc_type) - 1); @@ -526,6 +532,12 @@ } } + /* If winbindd returned a username, return the pointer to it here. */ + if (user_ret && response.extra_data.data) { + /* We have to trust it's a null terminated string. */ + *user_ret = response.extra_data.data; + } + return ret; } @@ -906,6 +918,7 @@ const char *cctype = NULL; int retval = PAM_AUTH_ERR; dictionary *d; + char *username_ret = NULL; /* parse arguments */ int ctrl = _pam_parse(argc, argv, &d); @@ -948,7 +961,8 @@ cctype = get_krb5_cc_type_from_config(argc, argv, ctrl, d); /* Now use the username to look up password */ - retval = winbind_auth_request(pamh, ctrl, username, password, member, cctype, True, NULL); + retval = winbind_auth_request(pamh, ctrl, username, password, member, + cctype, True, NULL, &username_ret); if (retval == PAM_NEW_AUTHTOK_REQD || retval == PAM_AUTHTOK_EXPIRED) { @@ -967,6 +981,11 @@ } out: + if (username_ret) { + pam_set_item (pamh, PAM_USER, username_ret); + free(username_ret); + } + if (d) { iniparser_freedict(d); } @@ -1259,7 +1278,8 @@ } /* verify that this is the password for this user */ - retval = winbind_auth_request(pamh, ctrl, user, pass_old, NULL, NULL, False, &pwdlastset_prelim); + retval = winbind_auth_request(pamh, ctrl, user, pass_old, + NULL, NULL, False, &pwdlastset_prelim, NULL); if (retval != PAM_ACCT_EXPIRED && retval != PAM_AUTHTOK_EXPIRED && @@ -1354,7 +1374,8 @@ const char *member = get_member_from_config(argc, argv, ctrl, d); const char *cctype = get_krb5_cc_type_from_config(argc, argv, ctrl, d); - retval = winbind_auth_request(pamh, ctrl, user, pass_new, member, cctype, False, NULL); + retval = winbind_auth_request(pamh, ctrl, user, pass_new, + member, cctype, False, NULL, NULL); _pam_overwrite(pass_new); _pam_overwrite(pass_old); pass_old = pass_new = NULL; Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c 2006-09-05 04:58:23 UTC (rev 18061) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c 2006-09-05 05:28:31 UTC (rev 18062) @@ -1306,9 +1306,40 @@ DEBUG(10,("Failed to get password policies: %s\n", nt_errstr(result))); goto done; } - - } + if (state->request.flags & WBFLAG_PAM_UNIX_NAME) { + /* We've been asked to return the unix username, per + 'winbind use default domain' settings and the like */ + + fstring username_out; + const char *nt_username, *nt_domain; + +
svn commit: samba r18061 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-05 04:58:23 + (Tue, 05 Sep 2006) New Revision: 18061 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18061 Log: this should fix the libreplace build on us4 with gcc Modified: branches/SAMBA_4_0/source/lib/replace/config.m4 branches/SAMBA_4_0/source/lib/replace/replace.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/config.m4 === --- branches/SAMBA_4_0/source/lib/replace/config.m4 2006-09-05 04:53:46 UTC (rev 18060) +++ branches/SAMBA_4_0/source/lib/replace/config.m4 2006-09-05 04:58:23 UTC (rev 18061) @@ -51,6 +51,7 @@ AC_CHECK_HEADERS(sys/syslog.h syslog.h) AC_CHECK_HEADERS(sys/time.h time.h) +AC_CHECK_HEADERS(sys/socket.h netinet/in.h) AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror) AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename) AC_CHECK_FUNCS(waitpid strlcpy strlcat innetgr initgroups memmove strdup) Modified: branches/SAMBA_4_0/source/lib/replace/replace.c === --- branches/SAMBA_4_0/source/lib/replace/replace.c 2006-09-05 04:53:46 UTC (rev 18060) +++ branches/SAMBA_4_0/source/lib/replace/replace.c 2006-09-05 04:58:23 UTC (rev 18061) @@ -31,6 +31,14 @@ #include #include +#if HAVE_SYS_SOCKET_H +#include +#endif + +#if HAVE_NETINET_IN_H +#include +#endif + void replace_dummy(void); void replace_dummy(void) {}
svn commit: samba r18060 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-05 04:53:46 + (Tue, 05 Sep 2006) New Revision: 18060 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18060 Log: use gmake for libreplace if available Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in === --- branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-05 04:48:01 UTC (rev 18059) +++ branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-05 04:53:46 UTC (rev 18060) @@ -1,3 +1,5 @@ +#!gmake +# CC = @CC@ prefix = @prefix@ exec_prefix = @exec_prefix@
svn commit: samba r18059 - in branches/SAMBA_4_0/source/lib/replace/test: .
Author: tridge Date: 2006-09-05 04:48:01 + (Tue, 05 Sep 2006) New Revision: 18059 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18059 Log: another cpp error Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c === --- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-05 04:23:11 UTC (rev 18058) +++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-05 04:48:01 UTC (rev 18059) @@ -31,7 +31,7 @@ #include #endif -#if HAVE_TYPES_H +#if HAVE_SYS_TYPES_H #include #endif
svn commit: samba r18058 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-05 04:23:11 + (Tue, 05 Sep 2006) New Revision: 18058 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18058 Log: we don't actually need __VA_ARGS__ yet (its another C99 feature which I don't think we use anywhere) Modified: branches/SAMBA_4_0/source/lib/replace/config.m4 Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/config.m4 === --- branches/SAMBA_4_0/source/lib/replace/config.m4 2006-09-05 04:19:16 UTC (rev 18057) +++ branches/SAMBA_4_0/source/lib/replace/config.m4 2006-09-05 04:23:11 UTC (rev 18058) @@ -185,10 +185,11 @@ AC_CHECK_FUNCS(timegm strnlen setenv) AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq) -AC_TRY_CPP([ -#define eprintf(...) fprintf(stderr, __VA_ARGS__) -eprintf("bla", "bar"); -], [], [AC_MSG_ERROR([__VA_ARGS__ is required])]) +# this test disabled as we don't actually need __VA_ARGS__ yet +# AC_TRY_CPP([ +# #define eprintf(...) fprintf(stderr, __VA_ARGS__) +# eprintf("bla", "bar"); +# ], [], [AC_MSG_ERROR([__VA_ARGS__ is required])]) # Check prerequisites AC_CHECK_FUNCS([memset printf syslog], [],
svn commit: samba r18057 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-05 04:19:16 + (Tue, 05 Sep 2006) New Revision: 18057 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18057 Log: fixed an #ifdef Modified: branches/SAMBA_4_0/source/lib/replace/timegm.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/timegm.c === --- branches/SAMBA_4_0/source/lib/replace/timegm.c 2006-09-05 02:05:36 UTC (rev 18056) +++ branches/SAMBA_4_0/source/lib/replace/timegm.c 2006-09-05 04:19:16 UTC (rev 18057) @@ -44,7 +44,7 @@ #include #endif -#ifdef TIME_H +#ifdef HAVE_TIME_H #include #endif
svn commit: samba r18056 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-05 02:05:36 + (Tue, 05 Sep 2006) New Revision: 18056 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18056 Log: includes needed for O_CREAT Modified: branches/SAMBA_4_0/source/lib/replace/replace.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/replace.c === --- branches/SAMBA_4_0/source/lib/replace/replace.c 2006-09-05 02:03:22 UTC (rev 18055) +++ branches/SAMBA_4_0/source/lib/replace/replace.c 2006-09-05 02:05:36 UTC (rev 18056) @@ -26,8 +26,10 @@ #include #include +#include #include -#include +#include +#include void replace_dummy(void); void replace_dummy(void) {}
svn commit: samba r18055 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-05 02:03:22 + (Tue, 05 Sep 2006) New Revision: 18055 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18055 Log: aix needs time.h for timegm.c to compile Modified: branches/SAMBA_4_0/source/lib/replace/config.m4 branches/SAMBA_4_0/source/lib/replace/timegm.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/config.m4 === --- branches/SAMBA_4_0/source/lib/replace/config.m4 2006-09-05 01:54:49 UTC (rev 18054) +++ branches/SAMBA_4_0/source/lib/replace/config.m4 2006-09-05 02:03:22 UTC (rev 18055) @@ -50,6 +50,7 @@ [AC_DEFINE(socklen_t, int,[Socket length type])]) AC_CHECK_HEADERS(sys/syslog.h syslog.h) +AC_CHECK_HEADERS(sys/time.h time.h) AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror) AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename) AC_CHECK_FUNCS(waitpid strlcpy strlcat innetgr initgroups memmove strdup) Modified: branches/SAMBA_4_0/source/lib/replace/timegm.c === --- branches/SAMBA_4_0/source/lib/replace/timegm.c 2006-09-05 01:54:49 UTC (rev 18054) +++ branches/SAMBA_4_0/source/lib/replace/timegm.c 2006-09-05 02:03:22 UTC (rev 18055) @@ -40,6 +40,14 @@ #ifndef HAVE_TIMEGM +#ifdef HAVE_SYS_TIME_H +#include +#endif + +#ifdef TIME_H +#include +#endif + static int is_leap(unsigned y) { y += 1900;
svn commit: samba r18054 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-05 01:54:49 + (Tue, 05 Sep 2006) New Revision: 18054 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18054 Log: snprintf.c needs to use replace.h to get the rep_vasprintf and related macros Modified: branches/SAMBA_4_0/source/lib/replace/snprintf.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/snprintf.c === --- branches/SAMBA_4_0/source/lib/replace/snprintf.c2006-09-05 01:50:52 UTC (rev 18053) +++ branches/SAMBA_4_0/source/lib/replace/snprintf.c2006-09-05 01:54:49 UTC (rev 18054) @@ -103,11 +103,7 @@ * **/ -#ifdef _SAMBA_BUILD_ -#include "config.h" -#else -#include "replace_config.h" -#endif +#include "replace.h" #ifdef TEST_SNPRINTF /* need math library headers for testing */
svn commit: samba r18053 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-05 01:50:52 + (Tue, 05 Sep 2006) New Revision: 18053 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18053 Log: the sig_atomic_t test needs to be in libreplace for getpass.c to compile on hpux Modified: branches/SAMBA_4_0/source/lib/replace/config.m4 Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/config.m4 === --- branches/SAMBA_4_0/source/lib/replace/config.m4 2006-09-04 22:58:55 UTC (rev 18052) +++ branches/SAMBA_4_0/source/lib/replace/config.m4 2006-09-05 01:50:52 UTC (rev 18053) @@ -192,3 +192,16 @@ # Check prerequisites AC_CHECK_FUNCS([memset printf syslog], [], [ AC_MSG_ERROR([Required function not found])]) + +AC_CACHE_CHECK([for sig_atomic_t type],samba_cv_sig_atomic_t, [ +AC_TRY_COMPILE([ +#include +#if STDC_HEADERS +#include +#include +#endif +#include ],[sig_atomic_t i = 0], + samba_cv_sig_atomic_t=yes,samba_cv_sig_atomic_t=no)]) +if test x"$samba_cv_sig_atomic_t" = x"yes"; then + AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE,1,[Whether we have the atomic_t variable type]) +fi
Re: Nested structures in C [was Re: svn commit: samba r18030 - in branches/SAMBA_3_0/source/tdb/common]
On Mon, Sep 04, 2006 at 07:37:12PM -0500, Gerald (Jerry) Carter wrote: > > I've got to agree with tridge here. These kind of things > are just not going to go away. The entire autogenerated > code from pidl uses the nested structure convention. > And we're about to get a lot more of that in Samba 3. You C++-hating luddite :-) :-). I can see I've lost this one...
Nested structures in C [was Re: svn commit: samba r18030 - in branches/SAMBA_3_0/source/tdb/common]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > Author: vlendec > Date: 2006-09-04 10:12:04 + (Mon, 04 Sep 2006) > New Revision: 18030 > > WebSVN: > http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18030 > > Log: > When compiling with C++, nested structs lead to > nested class definitions which are not compatible. I am > aware that this would be a huge change in Samba4, but > I would like to see it in the code that is shared. > > Stefan, when you do merge work, can you get this > across to Samba4? Hey Volker, I've got to agree with tridge here. These kind of things are just not going to go away. The entire autogenerated code from pidl uses the nested structure convention. And we're about to get a lot more of that in Samba 3. cheers, jerry = Samba--- http://www.samba.org Centeris --- http://www.centeris.com "What man is a man who does not make the world better?" --Balian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE/Ma4IR7qMdg1EfYRAudaAJ9u0KBvlzzG+qklV2N7QDxytuQXBgCfYg/j A3D4hkVYIEPwZ25cbObeozA= =Z4wf -END PGP SIGNATURE-
Build status as of Tue Sep 5 00:00:02 2006
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2006-09-04 00:00:16.0 + +++ /home/build/master/cache/broken_results.txt 2006-09-05 00:00:23.0 + @@ -1,19 +1,20 @@ -Build status as of Mon Sep 4 00:00:01 2006 +Build status as of Tue Sep 5 00:00:02 2006 Build counts: Tree Total Broken Panic SOC 0 0 0 -ccache 27 4 0 -distcc 29 2 0 -ldb 30 5 0 +ccache 36 9 0 +distcc 36 3 0 +ldb 33 31 0 +libreplace 30 9 0 lorikeet-heimdal 0 0 0 -ppp 17 0 0 -rsync32 3 0 +ppp 18 0 0 +rsync35 4 0 samba0 0 0 samba-docs 0 0 0 -samba4 39 22 2 -samba_3_037 5 0 -smb-build26 1 0 -talloc 34 4 0 -tdb 32 4 0 +samba4 40 22 1 +samba_3_037 7 0 +smb-build27 2 0 +talloc 36 6 0 +tdb 34 6 0
svn commit: samba r18052 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-04 22:58:55 + (Mon, 04 Sep 2006) New Revision: 18052 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18052 Log: discard_const_p() isn't part of the libreplace API, so we can't use it inside libreplace. Modified: branches/SAMBA_4_0/source/lib/replace/replace.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/replace.c === --- branches/SAMBA_4_0/source/lib/replace/replace.c 2006-09-04 22:49:30 UTC (rev 18051) +++ branches/SAMBA_4_0/source/lib/replace/replace.c 2006-09-04 22:58:55 UTC (rev 18052) @@ -506,7 +506,7 @@ for (s=haystack;*s;s++) { if (toupper(*needle) == toupper(*s) && strncasecmp(s, needle, nlen) == 0) { - return discard_const_p(char, s); + return (char *)((intptr_t)s); } } return NULL;
svn commit: samba r18051 - in branches/SAMBA_4_0/source/lib/replace: . test
Author: tridge Date: 2006-09-04 22:49:30 + (Mon, 04 Sep 2006) New Revision: 18051 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18051 Log: - add gcc warning flags - fix piles of warnings and ftruncate bug in libreplace testsuite Modified: branches/SAMBA_4_0/source/lib/replace/configure.ac branches/SAMBA_4_0/source/lib/replace/test/testsuite.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/configure.ac === --- branches/SAMBA_4_0/source/lib/replace/configure.ac 2006-09-04 20:48:29 UTC (rev 18050) +++ branches/SAMBA_4_0/source/lib/replace/configure.ac 2006-09-04 22:49:30 UTC (rev 18051) @@ -46,6 +46,12 @@ AC_CONFIG_SRCDIR([dlfcn.c]) AC_CONFIG_HEADER(replace_config.h) AC_PROG_INSTALL +AC_PROG_CC + +if test "$ac_cv_prog_gcc" = yes; then + CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings" +fi + sinclude(config.m4) sinclude(win32/config.m4) sinclude(repdir/config.m4) Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c === --- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-04 20:48:29 UTC (rev 18050) +++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-04 22:49:30 UTC (rev 18051) @@ -39,6 +39,14 @@ #include #endif +#if HAVE_UNISTD_H +#include +#endif + +#if HAVE_STRING_H +#include +#endif + #include #include @@ -47,11 +55,11 @@ /* test ftruncate() function */ -static int test_ftruncate() +static int test_ftruncate(void) { struct stat st; - int fd, i; - const int size; + int fd; + const int size = 1234; printf("testing ftruncate\n"); unlink(TESTFILE); fd = open(TESTFILE, O_RDWR|O_CREAT, 0600); @@ -79,7 +87,7 @@ test strlcpy() function. see http://www.gratisoft.us/todd/papers/strlcpy.html */ -static int test_strlcpy() +static int test_strlcpy(void) { char buf[4]; const struct { @@ -103,224 +111,224 @@ return true; } -static int test_strlcat() +static int test_strlcat(void) { /* FIXME */ return true; } -static int test_mktime() +static int test_mktime(void) { /* FIXME */ return true; } -static int test_rename() +static int test_rename(void) { /* FIXME */ return true; } -static int test_innetgr() +static int test_innetgr(void) { /* FIXME */ return true; } -static int test_initgroups() +static int test_initgroups(void) { /* FIXME */ return true; } -static int test_memmove() +static int test_memmove(void) { /* FIXME */ return true; } -static int test_strdup() +static int test_strdup(void) { /* FIXME */ return true; } -static int test_setlinebuf() +static int test_setlinebuf(void) { /* FIXME */ return true; } -static int test_vsyslog() +static int test_vsyslog(void) { /* FIXME */ return true; } -static int test_timegm() +static int test_timegm(void) { /* FIXME */ return true; } -static int test_setenv() +static int test_setenv(void) { /* FIXME */ return true; } -static int test_strndup() +static int test_strndup(void) { /* FIXME */ return true; } -static int test_strnlen() +static int test_strnlen(void) { /* FIXME */ return true; } -static int test_waitpid() +static int test_waitpid(void) { /* FIXME */ return true; } -static int test_seteuid() +static int test_seteuid(void) { /* FIXME */ return true; } -static int test_setegid() +static int test_setegid(void) { /* FIXME */ return true; } -static int test_asprintf() +static int test_asprintf(void) { /* FIXME */ return true; } -static int test_snprintf() +static int test_snprintf(void) { /* FIXME */ return true; } -static int test_vasprintf() +static int test_vasprintf(void) { /* FIXME */ return true; } -static int test_vsnprintf() +static int test_vsnprintf(void) { /* FIXME */ return true; } -static int test_opendir() +static int test_opendir(void) { /* FIXME */ return true; } -static int test_readdir() +static int test_readdir(void) { /* FIXME */ return true; } -static int test_telldir() +static int test_telldir(void) { /* FIXME */ return true; } -static int test_seekdir() +static int test_seekdir(void) { /* FIXME */ return true; } -static int test_dlopen() +static int test_dlopen(void) { /* FIXME: test dlopen, dlsym, dlclose, dlerror */ return true; } -static int test_chroot() +static int test_chroot(void) { /* FIXME: chroot() */ retur
svn commit: samba r18050 - in branches/SAMBA_4_0/source/script/tests: .
Author: mimir Date: 2006-09-04 20:48:29 + (Mon, 04 Sep 2006) New Revision: 18050 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18050 Log: Run more NET tests on the build farm. rafal Modified: branches/SAMBA_4_0/source/script/tests/test_net.sh Changeset: Modified: branches/SAMBA_4_0/source/script/tests/test_net.sh === --- branches/SAMBA_4_0/source/script/tests/test_net.sh 2006-09-04 19:53:30 UTC (rev 18049) +++ branches/SAMBA_4_0/source/script/tests/test_net.sh 2006-09-04 20:48:29 UTC (rev 18050) @@ -2,9 +2,9 @@ # add tests to this list as they start passing, so we test # that they stay passing -ncacn_np_tests="NET-API-RPCCONN-BIND NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER" -ncalrpc_tests="NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER" -ncacn_ip_tcp_tests="NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER" +ncacn_np_tests="NET-API-RPCCONN-BIND NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER" +ncalrpc_tests="NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER" +ncacn_ip_tcp_tests="NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER" if [ $# -lt 4 ]; then cat <
svn commit: samba r18049 - in branches/SAMBA_3_0/source/lib: .
Author: idra Date: 2006-09-04 19:53:30 + (Mon, 04 Sep 2006) New Revision: 18049 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18049 Log: Backport SAMBA_4_0 snprintf changes Modified: branches/SAMBA_3_0/source/lib/snprintf.c Changeset: Modified: branches/SAMBA_3_0/source/lib/snprintf.c === --- branches/SAMBA_3_0/source/lib/snprintf.c2006-09-04 19:50:30 UTC (rev 18048) +++ branches/SAMBA_3_0/source/lib/snprintf.c2006-09-04 19:53:30 UTC (rev 18049) @@ -197,6 +197,7 @@ #define DP_C_LONG3 #define DP_C_LDOUBLE 4 #define DP_C_LLONG 5 +#define DP_C_SIZET 6 /* Chunk types */ #define CNK_FMT_STR 0 @@ -467,6 +468,10 @@ cnk->cflags = DP_C_LDOUBLE; ch = *format++; break; + case 'z': + cnk->cflags = DP_C_SIZET; + ch = *format++; + break; default: break; } @@ -575,6 +580,8 @@ cnk->value = va_arg (args, long int); else if (cnk->cflags == DP_C_LLONG) cnk->value = va_arg (args, LLONG); + else if (cnk->cflags == DP_C_SIZET) + cnk->value = va_arg (args, ssize_t); else cnk->value = va_arg (args, int); @@ -592,6 +599,8 @@ cnk->value = (unsigned long int)va_arg (args, unsigned long int); else if (cnk->cflags == DP_C_LLONG) cnk->value = (LLONG)va_arg (args, unsigned LLONG); + else if (cnk->cflags == DP_C_SIZET) + cnk->value = (size_t)va_arg (args, size_t); else cnk->value = (unsigned int)va_arg (args, unsigned int); @@ -644,6 +653,8 @@ cnk->pnum = va_arg (args, long int *); else if (cnk->cflags == DP_C_LLONG) cnk->pnum = va_arg (args, LLONG *); + else if (cnk->cflags == DP_C_SIZET) + cnk->pnum = va_arg (args, ssize_t *); else cnk->pnum = va_arg (args, int *); @@ -725,6 +736,8 @@ *((long int *)(cnk->pnum)) = (long int)currlen; else if (cnk->cflags == DP_C_LLONG) *((LLONG *)(cnk->pnum)) = (LLONG)currlen; + else if (cnk->cflags == DP_C_SIZET) + *((ssize_t *)(cnk->pnum)) = (ssize_t)currlen; else *((int *)(cnk->pnum)) = (int)currlen; break; @@ -1260,6 +1273,7 @@ #ifdef TEST_SNPRINTF int sprintf(char *str,const char *fmt,...); + int printf(const char *fmt,...); int main (void) { @@ -1329,15 +1343,20 @@ int fail = 0; int num = 0; int l1, l2; + char *ss_fmt[] = { + "%zd", + "%zu", + NULL + }; + size_t ss_nums[] = {134, 91340, 123456789, 0203, 1234567890, 0}; printf ("Testing snprintf format codes against system sprintf...\n"); for (x = 0; fp_fmt[x] ; x++) { for (y = 0; fp_nums[y] != 0 ; y++) { buf1[0] = buf2[0] = '\0'; - l1 = snprintf(NULL, 0, fp_fmt[x], fp_nums[y]); - l2 = sprintf(buf1, fp_fmt[x], fp_nums[y]); - sprintf (buf2, fp_fmt[x], fp_nums[y]); + l1 = snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]); + l2 = sprintf (buf2, fp_fmt[x], fp_nums[y]); buf1[1023] = buf2[1023] = '\0'; if (strcmp (buf1, buf2) || (l1 != l2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", @@ -1351,9 +1370,8 @@ for (x = 0; int_fmt[x] ; x++) { for (y = 0; int_nums[y] != 0 ; y++) { buf1[0] = buf2[0] = '\0'; - l1 = snprintf(NULL, 0, int_fmt[x], int_nums[y]); - l2 = sprintf(buf1, int_fmt[x], int_nums[y]); - sprintf (buf2, int_fmt[x], int_nums[y]); + l1 = snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]); + l2 = sprintf (buf2, int_fmt[x], int_nums[y]); buf1[1023] = buf2[1023] = '\0'; if (strcmp (buf1, buf2) || (l1 != l2)) {
svn commit: samba r18048 - in branches/SAMBA_3_0/source/lib: .
Author: vlendec Date: 2006-09-04 19:50:30 + (Mon, 04 Sep 2006) New Revision: 18048 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18048 Log: More nested structures Modified: branches/SAMBA_3_0/source/lib/talloctort.c Changeset: Modified: branches/SAMBA_3_0/source/lib/talloctort.c === --- branches/SAMBA_3_0/source/lib/talloctort.c 2006-09-04 19:47:48 UTC (rev 18047) +++ branches/SAMBA_3_0/source/lib/talloctort.c 2006-09-04 19:50:30 UTC (rev 18048) @@ -609,19 +609,22 @@ return True; } +struct el2 { + const char *name; +}; +struct el1 { + int count; + struct el2 **list, **list2, **list3; +}; + /* test realloc with a child */ static BOOL test_realloc_child(void) { void *root; - struct el1 { - int count; - struct el2 { - const char *name; - } **list, **list2, **list3; - } *el1; + struct el1 *el1; struct el2 *el2; printf("TESTING REALLOC WITH CHILD\n");
svn commit: samba r18047 - in branches/SAMBA_3_0/source: client libads libsmb nsswitch printing rpc_parse utils
Author: vlendec Date: 2006-09-04 19:47:48 + (Mon, 04 Sep 2006) New Revision: 18047 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18047 Log: More C++ stuff Modified: branches/SAMBA_3_0/source/client/clitar.c branches/SAMBA_3_0/source/libads/kerberos_verify.c branches/SAMBA_3_0/source/libads/sasl.c branches/SAMBA_3_0/source/libsmb/smbdes.c branches/SAMBA_3_0/source/nsswitch/winbindd_async.c branches/SAMBA_3_0/source/printing/print_iprint.c branches/SAMBA_3_0/source/rpc_parse/parse_dfs.c branches/SAMBA_3_0/source/utils/net_lookup.c Changeset: Modified: branches/SAMBA_3_0/source/client/clitar.c === --- branches/SAMBA_3_0/source/client/clitar.c 2006-09-04 16:30:40 UTC (rev 18046) +++ branches/SAMBA_3_0/source/client/clitar.c 2006-09-04 19:47:48 UTC (rev 18047) @@ -1075,7 +1075,7 @@ /* finfo.size here is the length of the filename as written by the "/./@LongLink" name * header call. */ int namesize = finfo.size + strlen(cur_dir) + 2; - char *longname = SMB_MALLOC(namesize); + char *longname = (char *)SMB_MALLOC(namesize); int offset = 0, left = finfo.size; BOOL first = True; @@ -1523,7 +1523,7 @@ while ((! error) && (x_fgets(buf, sizeof(buf)-1, inclusion))) { if (inclusion_buffer == NULL) { inclusion_buffer_size = 1024; - if ((inclusion_buffer = SMB_MALLOC(inclusion_buffer_size)) == NULL) { + if ((inclusion_buffer = (char *)SMB_MALLOC(inclusion_buffer_size)) == NULL) { DEBUG(0,("failure allocating buffer to read inclusion file\n")); error = 1; break; @@ -1536,7 +1536,7 @@ if ((strlen(buf) + 1 + inclusion_buffer_sofar) >= inclusion_buffer_size) { inclusion_buffer_size *= 2; - inclusion_buffer = SMB_REALLOC(inclusion_buffer,inclusion_buffer_size); + inclusion_buffer = (char *)SMB_REALLOC(inclusion_buffer,inclusion_buffer_size); if (!inclusion_buffer) { DEBUG(0,("failure enlarging inclusion buffer to %d bytes\n", inclusion_buffer_size)); Modified: branches/SAMBA_3_0/source/libads/kerberos_verify.c === --- branches/SAMBA_3_0/source/libads/kerberos_verify.c 2006-09-04 16:30:40 UTC (rev 18046) +++ branches/SAMBA_3_0/source/libads/kerberos_verify.c 2006-09-04 19:47:48 UTC (rev 18047) @@ -101,7 +101,7 @@ if (strequal(entry_princ_s, valid_princ_formats[i])) { number_matched_principals++; p_packet->length = ticket->length; - p_packet->data = (krb5_pointer)ticket->data; + p_packet->data = (char *)ticket->data; *pp_tkt = NULL; ret = krb5_rd_req_return_keyblock_from_keytab(context, &auth_context, p_packet, @@ -228,7 +228,7 @@ /* CIFS doesn't use addresses in tickets. This would break NAT. JRA */ p_packet->length = ticket->length; - p_packet->data = (krb5_pointer)ticket->data; + p_packet->data = (char *)ticket->data; /* We need to setup a auth context with each possible encoding type in turn. */ for (i=0;enctypes[i];i++) { Modified: branches/SAMBA_3_0/source/libads/sasl.c === --- branches/SAMBA_3_0/source/libads/sasl.c 2006-09-04 16:30:40 UTC (rev 18046) +++ branches/SAMBA_3_0/source/libads/sasl.c 2006-09-04 19:47:48 UTC (rev 18047) @@ -348,7 +348,7 @@ goto failed; } - cred.bv_val = output_token.value; + cred.bv_val = (char *)output_token.value; cred.bv_len = output_token.length; rc = ldap_sasl_bind_s(ads->ld, NULL, "GSSAPI", &cred, NULL, NULL, @@ -397,7 +397,7 @@ gss_release_buffer(&minor_status, &output_token); output_token.value = SMB_MALLOC(strlen(ads->config.bind_path) + 8); - p = output_token.value; + p = (uint8 *)output_token.value; *p++ = 1; /* no sign & seal selection */ /* choose the same size as the server gave us */ @@ -419,7 +419,7 @@ free(output_token.value); - cred.bv_val = input_token.value; + cred.bv_val = (char *)input_token.value; cred.bv_len = input_token.length; rc = ldap_sasl_bind_s(ads->ld, NULL, "GSSAPI", &cred, NULL, NULL, Modified: branches/SAMBA_3_0/source/libsmb/smbdes.c =
svn commit: samba r18046 - in branches/SAMBA_4_0/source/lib/replace: .
Author: idra Date: 2006-09-04 16:30:40 + (Mon, 04 Sep 2006) New Revision: 18046 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18046 Log: Add 'z' specifier support and a configure test. Jeremy should I backport this to samba3 too? Modified: branches/SAMBA_4_0/source/lib/replace/config.m4 branches/SAMBA_4_0/source/lib/replace/snprintf.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/config.m4 === --- branches/SAMBA_4_0/source/lib/replace/config.m4 2006-09-04 13:47:57 UTC (rev 18045) +++ branches/SAMBA_4_0/source/lib/replace/config.m4 2006-09-04 16:30:40 UTC (rev 18046) @@ -91,7 +91,9 @@ AC_CACHE_CHECK([for C99 vsnprintf],samba_cv_HAVE_C99_VSNPRINTF,[ AC_TRY_RUN([ #include +#include #include +#include void foo(const char *format, ...) { va_list ap; int len; @@ -107,12 +109,14 @@ va_start(ap, format); len = vsnprintf(0, 0, format, ap); va_end(ap); - if (len != 5) exit(1); + if (len != 5) exit(2); - if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); + if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(3); - if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(1); - if (snprintf(buf, 20, "%s", 0) < 3) exit(1); + if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(4); + if (snprintf(buf, 20, "%zu", 123456789) != 9 || strcmp(buf, "123456789") != 0) exit(5); + if (snprintf(buf, 20, "%2\$d %1\$d", 3, 4) != 3 || strcmp(buf, "4 3") != 0) exit(6); + if (snprintf(buf, 20, "%s", 0) < 3) exit(7); exit(0); } Modified: branches/SAMBA_4_0/source/lib/replace/snprintf.c === --- branches/SAMBA_4_0/source/lib/replace/snprintf.c2006-09-04 13:47:57 UTC (rev 18045) +++ branches/SAMBA_4_0/source/lib/replace/snprintf.c2006-09-04 16:30:40 UTC (rev 18046) @@ -200,6 +200,7 @@ #define DP_C_LONG3 #define DP_C_LDOUBLE 4 #define DP_C_LLONG 5 +#define DP_C_SIZET 6 /* Chunk types */ #define CNK_FMT_STR 0 @@ -467,6 +468,10 @@ cnk->cflags = DP_C_LDOUBLE; ch = *format++; break; + case 'z': + cnk->cflags = DP_C_SIZET; + ch = *format++; + break; default: break; } @@ -575,6 +580,8 @@ cnk->value = va_arg (args, long int); else if (cnk->cflags == DP_C_LLONG) cnk->value = va_arg (args, LLONG); + else if (cnk->cflags == DP_C_SIZET) + cnk->value = va_arg (args, ssize_t); else cnk->value = va_arg (args, int); @@ -592,6 +599,8 @@ cnk->value = (unsigned long int)va_arg (args, unsigned long int); else if (cnk->cflags == DP_C_LLONG) cnk->value = (LLONG)va_arg (args, unsigned LLONG); + else if (cnk->cflags == DP_C_SIZET) + cnk->value = (size_t)va_arg (args, size_t); else cnk->value = (unsigned int)va_arg (args, unsigned int); @@ -644,6 +653,8 @@ cnk->pnum = va_arg (args, long int *); else if (cnk->cflags == DP_C_LLONG) cnk->pnum = va_arg (args, LLONG *); + else if (cnk->cflags == DP_C_SIZET) + cnk->pnum = va_arg (args, ssize_t *); else cnk->pnum = va_arg (args, int *); @@ -725,6 +736,8 @@ *((long int *)(cnk->pnum)) = (long int)currlen; else if (cnk->cflags == DP_C_LLONG) *((LLONG *)(cnk->pnum)) = (LLONG)currlen; + else if (cnk->cflags == DP_C_SIZET) + *((ssize_t *)(cnk->pnum)) = (ssize_t)currlen; else *((int *)(cnk->pnum)) = (int)currlen; break; @@ -1258,6 +1271,7 @@ #ifdef TEST_SNPRINTF int sprintf(char *str,const char *fmt,...); + int printf(const char *fmt,...); int main (void) { @@ -1327,15 +1341,20 @@ int fail = 0; int num = 0; int l1, l2; + char *ss_fmt[] = { + "%zd", + "%zu", + NULL + }; + size_t ss_nums[] = {134, 91340, 123456789, 0203,
Re: svn commit: samba r18012 - in branches/SAMBA_3_0: examples/libsmbclient source/libsmb
"Stefan (metze) Metzmacher" <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] schrieb: >> Author: derrell >> Date: 2006-09-03 01:37:26 + (Sun, 03 Sep 2006) >> New Revision: 18012 >> >> WebSVN: >> http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18012 >> >> Log: >> Should fix bug 4018. >> >> NetApp filers expect paths in Open AndX Request to have a leading slash. >> Windows clients send the leading slash, so we should too. > > Hi Derrell, > > a torture test for this would be nice:-) I've never written a torture test before, and I don't know how to run the torture tests. (Maybe that's something for me to learn while at the conference.) Does this (untested) patch do something close to what it's supposed to? Index: torture/raw/open.c === --- torture/raw/open.c (revision 17937) +++ torture/raw/open.c (working copy) @@ -351,6 +351,21 @@ CHECK_VAL(io.openx.out.size, 1024*1024); CHECK_ALL_INFO(io.openx.in.size, size); smbcli_close(cli->tree, fnum); + + /* + * Ensure that opening the file without the leading slash works. + * NetApp filers are known to fail on this. + */ + io.openx.in.open_func = OPENX_OPEN_FUNC_OPEN; + io.openx.in.fname = fname + 1; + status = smb_raw_open(cli->tree, mem_ctx, &io); + CHECK_STATUS(status, NT_STATUS_OK); + fnum = io.openx.out.file.fnum; + smbcli_close(cli->tree, fnum); + +/* Reset io.openx.in.fname back to its proper value */ +io.openx.in.fname = fname; + smbcli_unlink(cli->tree, fname); /* check the fields when the file already existed */
svn commit: samba r18045 - in branches/SAMBA_4_0/source/lib/replace: . test
Author: jelmer Date: 2006-09-04 13:47:57 + (Mon, 04 Sep 2006) New Revision: 18045 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18045 Log: Update format, list "test" target as phony. Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in branches/SAMBA_4_0/source/lib/replace/test/testsuite.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in === --- branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 13:35:03 UTC (rev 18044) +++ branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 13:47:57 UTC (rev 18045) @@ -9,6 +9,8 @@ builddir = @builddir@ INSTALL = @INSTALL@ +.PHONY: test + CFLAGS=-I. -I$(srcdir) @CFLAGS@ OBJS = dlfcn.o getpass.o replace.o snprintf.o timegm.o Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c === --- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-04 13:35:03 UTC (rev 18044) +++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-04 13:47:57 UTC (rev 18045) @@ -96,7 +96,7 @@ printf("testing strlcpy\n"); for (i=0;tests[i].src;i++) { if (strlcpy(buf, tests[i].src, sizeof(buf)) != tests[i].result) { - printf("strlcpy test %d failed\n"); + printf("strlcpy test %d failed\n", i); return false; } }
svn commit: samba r18044 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-04 13:35:03 + (Mon, 04 Sep 2006) New Revision: 18044 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18044 Log: timegm.c needs to be in a separate file Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in branches/SAMBA_4_0/source/lib/replace/replace.c branches/SAMBA_4_0/source/lib/replace/timegm.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in === --- branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 13:28:54 UTC (rev 18043) +++ branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 13:35:03 UTC (rev 18044) @@ -11,7 +11,7 @@ CFLAGS=-I. -I$(srcdir) @CFLAGS@ -OBJS = dlfcn.o getpass.o replace.o snprintf.o +OBJS = dlfcn.o getpass.o replace.o snprintf.o timegm.o all: libreplace.a testsuite Modified: branches/SAMBA_4_0/source/lib/replace/replace.c === --- branches/SAMBA_4_0/source/lib/replace/replace.c 2006-09-04 13:28:54 UTC (rev 18043) +++ branches/SAMBA_4_0/source/lib/replace/replace.c 2006-09-04 13:35:03 UTC (rev 18044) @@ -468,7 +468,7 @@ { char *dname; - if (dname = mktemp(template)) { + if ((dname = mktemp(template))) { if (mkdir(dname, 0700) >= 0) { return dname; } @@ -603,34 +603,3 @@ } #endif -#if !defined(HAVE_TIMEGM) - -static int is_leap(unsigned y) -{ - y += 1900; - return (y % 4) == 0 && ((y % 100) != 0 || (y % 400) == 0); -} - -time_t timegm(struct tm *tm) -{ - static const unsigned ndays[2][12] ={ - {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, - {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}}; - time_t res = 0; - unsigned i; - - for (i = 70; i < tm->tm_year; ++i) - res += is_leap(i) ? 366 : 365; - - for (i = 0; i < tm->tm_mon; ++i) - res += ndays[is_leap(tm->tm_year)][i]; - res += tm->tm_mday - 1; - res *= 24; - res += tm->tm_hour; - res *= 60; - res += tm->tm_min; - res *= 60; - res += tm->tm_sec; - return res; -} -#endif Modified: branches/SAMBA_4_0/source/lib/replace/timegm.c === --- branches/SAMBA_4_0/source/lib/replace/timegm.c 2006-09-04 13:28:54 UTC (rev 18043) +++ branches/SAMBA_4_0/source/lib/replace/timegm.c 2006-09-04 13:35:03 UTC (rev 18044) @@ -35,8 +35,8 @@ adapted for Samba4 by Andrew Tridgell */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "replace.h" +#include #ifndef HAVE_TIMEGM
svn commit: samba r18043 - in branches/SAMBA_4_0/source/lib/replace/test: .
Author: tridge Date: 2006-09-04 13:28:54 + (Mon, 04 Sep 2006) New Revision: 18043 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18043 Log: added strlcpy() test Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c === --- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-04 13:27:16 UTC (rev 18042) +++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-04 13:28:54 UTC (rev 18043) @@ -75,9 +75,31 @@ return true; } +/* + test strlcpy() function. + see http://www.gratisoft.us/todd/papers/strlcpy.html + */ static int test_strlcpy() { - /* FIXME */ + char buf[4]; + const struct { + const char *src; + int result; + } tests[] = { + { "abc", 3 }, + { "abcdef", 6 }, + { "abcd", 4 }, + { "", 0 }, + { NULL, 0 } + }; + int i; + printf("testing strlcpy\n"); + for (i=0;tests[i].src;i++) { + if (strlcpy(buf, tests[i].src, sizeof(buf)) != tests[i].result) { + printf("strlcpy test %d failed\n"); + return false; + } + } return true; } @@ -347,7 +369,6 @@ int torture_local_replace() { int ret = true; -; ret &= test_ftruncate(); ret &= test_strlcpy(); ret &= test_strlcat();
svn commit: samba r18042 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-04 13:27:16 + (Mon, 04 Sep 2006) New Revision: 18042 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18042 Log: testsuite needs to link to libreplace.a :-) Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in === --- branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 13:10:49 UTC (rev 18041) +++ branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 13:27:16 UTC (rev 18042) @@ -31,7 +31,7 @@ TEST_OBJS = test/testsuite.o testsuite: libreplace.a $(TEST_OBJS) - $(CC) -o testsuite $(TEST_OBJS) + $(CC) -o testsuite $(TEST_OBJS) -L. -lreplace .c.o: @echo Compiling $*.c
Re: svn commit: samba r18025 - in branches/SAMBA_4_0/source/libcli/ldap: .
On Mon, 2006-09-04 at 03:59 +, [EMAIL PROTECTED] wrote: > Author: abartlet > Date: 2006-09-04 03:59:04 + (Mon, 04 Sep 2006) > New Revision: 18025 > > WebSVN: > http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18025 > > Log: > Don't try to set a target host if there isn't one (such as with ldapi://). Shouldn't we try use localhost or (hostname -f) here? Simo. -- Simo Sorce Samba Team GPL Compliance Officer email: [EMAIL PROTECTED] http://samba.org
svn commit: samba r18041 - in branches/SAMBA_4_0/source/lib/replace: . test
Author: tridge Date: 2006-09-04 13:10:49 + (Mon, 04 Sep 2006) New Revision: 18041 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18041 Log: started on the bodies of the testsuite functions for libreplace Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in branches/SAMBA_4_0/source/lib/replace/test/testsuite.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in === --- branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 13:10:14 UTC (rev 18040) +++ branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 13:10:49 UTC (rev 18041) @@ -13,7 +13,7 @@ OBJS = dlfcn.o getpass.o replace.o snprintf.o -all: libreplace.a +all: libreplace.a testsuite install: all mkdir -p $(libdir) Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c === --- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-04 13:10:14 UTC (rev 18040) +++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-04 13:10:49 UTC (rev 18041) @@ -27,9 +27,51 @@ #include "../replace.h" #include +#if HAVE_STDLIB_H +#include +#endif + +#if HAVE_TYPES_H +#include +#endif + +#if HAVE_SYS_STAT_H +#include +#endif + +#include +#include + +#define TESTFILE "testfile.dat" + +/* + test ftruncate() function + */ static int test_ftruncate() { - /* FIXME */ + struct stat st; + int fd, i; + const int size; + printf("testing ftruncate\n"); + unlink(TESTFILE); + fd = open(TESTFILE, O_RDWR|O_CREAT, 0600); + if (fd == -1) { + printf("creating '%s' failed - %s\n", TESTFILE, strerror(errno)); + return false; + } + if (ftruncate(fd, size) != 0) { + printf("ftruncate failed - %s\n", strerror(errno)); + return false; + } + if (fstat(fd, &st) != 0) { + printf("fstat failed - %s\n", strerror(errno)); + return false; + } + if (st.st_size != size) { + printf("ftruncate gave wrong size %d - expected %d\n", + (int)st.st_size, size); + return false; + } return true; }
svn commit: samba r18040 - in branches/SAMBA_4_0/source/lib/replace: .
Author: jelmer Date: 2006-09-04 13:10:14 + (Mon, 04 Sep 2006) New Revision: 18040 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18040 Log: Use only one strnlen implementation Modified: branches/SAMBA_4_0/source/lib/replace/replace.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/replace.c === --- branches/SAMBA_4_0/source/lib/replace/replace.c 2006-09-04 13:07:29 UTC (rev 18039) +++ branches/SAMBA_4_0/source/lib/replace/replace.c 2006-09-04 13:10:14 UTC (rev 18040) @@ -375,7 +375,7 @@ /** Some platforms don't have strnlen **/ - size_t strnlen(const char *s, size_t max) + size_t rep_strnlen(const char *s, size_t max) { size_t len; @@ -540,19 +540,6 @@ } #endif -#ifndef HAVE_STRNLEN -/** - Some platforms don't have strnlen -**/ -size_t rep_strnlen(const char *s, size_t n) -{ - int i; - for (i=0; s[i] && i
svn commit: samba r18039 - in branches/SAMBA_4_0/source/lib/replace: .
Author: jelmer Date: 2006-09-04 13:07:29 + (Mon, 04 Sep 2006) New Revision: 18039 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18039 Log: Include header with time_t if needed. Modified: branches/SAMBA_4_0/source/lib/replace/replace.h Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/replace.h === --- branches/SAMBA_4_0/source/lib/replace/replace.h 2006-09-04 12:57:40 UTC (rev 18038) +++ branches/SAMBA_4_0/source/lib/replace/replace.h 2006-09-04 13:07:29 UTC (rev 18039) @@ -76,11 +76,21 @@ void *rep_memmove(void *dest,const void *src,int size); #endif +#if !defined(HAVE_MKTIME) || !defined(HAVE_TIMEGM) +#include +#endif + #ifndef HAVE_MKTIME #define mktime rep_mktime time_t rep_mktime(struct tm *t); #endif +#ifndef HAVE_TIMEGM +struct tm; +#define timegm rep_timegm +time_t rep_timegm(struct tm *tm); +#endif + #ifndef HAVE_STRLCPY #define strlcpy rep_strlcpy size_t rep_strlcpy(char *d, const char *s, size_t bufsize); @@ -145,11 +155,6 @@ #define bzero(a,b) memset((a),'\0',(b)) #endif -#ifndef HAVE_TIMEGM -struct tm; -#define timegm rep_timegm -time_t rep_timegm(struct tm *tm); -#endif #ifndef PRINTF_ATTRIBUTE #if __GNUC__ >= 3
Rev 9572: Merge upstream changes in file:///home/jelmer/bzr.samba/4.0-replace/
revno: 9572 committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Mon 2006-09-04 15:01:26 +0200 message: Merge upstream changes modified: source/lib/replace/test/testsuite.c merged: svn-v1:[EMAIL PROTECTED] committer: tridge timestamp: Mon 2006-09-04 12:57:40 + message: make test fns static
Rev 9571: Merge upstream changes in file:///home/jelmer/bzr.samba/4.0-replace/
revno: 9571 committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Mon 2006-09-04 14:59:30 +0200 message: Merge upstream changes removed: source/lib/ldb/configure.ac source/lib/ldb/replace.m4 added: source/lib/ldb/configure.ac source/lib/ldb/replace.m4 modified: source/lib/replace/Makefile.in merged: svn-v1:[EMAIL PROTECTED] committer: tridge timestamp: Mon 2006-09-04 12:56:14 + message: added 'make installcheck' target merged: svn-v1:[EMAIL PROTECTED] committer: jelmer timestamp: Mon 2006-09-04 12:49:17 + message: Add missing file
svn commit: samba r18038 - in branches/SAMBA_4_0/source/lib/replace/test: .
Author: tridge Date: 2006-09-04 12:57:40 + (Mon, 04 Sep 2006) New Revision: 18038 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18038 Log: make test fns static Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c === --- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-04 12:56:14 UTC (rev 18037) +++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2006-09-04 12:57:40 UTC (rev 18038) @@ -27,236 +27,236 @@ #include "../replace.h" #include -int test_ftruncate() +static int test_ftruncate() { /* FIXME */ return true; } -int test_strlcpy() +static int test_strlcpy() { /* FIXME */ return true; } -int test_strlcat() +static int test_strlcat() { /* FIXME */ return true; } -int test_mktime() +static int test_mktime() { /* FIXME */ return true; } -int test_rename() +static int test_rename() { /* FIXME */ return true; } -int test_innetgr() +static int test_innetgr() { /* FIXME */ return true; } -int test_initgroups() +static int test_initgroups() { /* FIXME */ return true; } -int test_memmove() +static int test_memmove() { /* FIXME */ return true; } -int test_strdup() +static int test_strdup() { /* FIXME */ return true; } -int test_setlinebuf() +static int test_setlinebuf() { /* FIXME */ return true; } -int test_vsyslog() +static int test_vsyslog() { /* FIXME */ return true; } -int test_timegm() +static int test_timegm() { /* FIXME */ return true; } -int test_setenv() +static int test_setenv() { /* FIXME */ return true; } -int test_strndup() +static int test_strndup() { /* FIXME */ return true; } -int test_strnlen() +static int test_strnlen() { /* FIXME */ return true; } -int test_waitpid() +static int test_waitpid() { /* FIXME */ return true; } -int test_seteuid() +static int test_seteuid() { /* FIXME */ return true; } -int test_setegid() +static int test_setegid() { /* FIXME */ return true; } -int test_asprintf() +static int test_asprintf() { /* FIXME */ return true; } -int test_snprintf() +static int test_snprintf() { /* FIXME */ return true; } -int test_vasprintf() +static int test_vasprintf() { /* FIXME */ return true; } -int test_vsnprintf() +static int test_vsnprintf() { /* FIXME */ return true; } -int test_opendir() +static int test_opendir() { /* FIXME */ return true; } -int test_readdir() +static int test_readdir() { /* FIXME */ return true; } -int test_telldir() +static int test_telldir() { /* FIXME */ return true; } -int test_seekdir() +static int test_seekdir() { /* FIXME */ return true; } -int test_dlopen() +static int test_dlopen() { /* FIXME: test dlopen, dlsym, dlclose, dlerror */ return true; } -int test_chroot() +static int test_chroot() { /* FIXME: chroot() */ return true; } -int test_bzero() +static int test_bzero() { /* FIXME: bzero */ return true; } -int test_strerror() +static int test_strerror() { /* FIXME */ return true; } -int test_errno() +static int test_errno() { /* FIXME */ return true; } -int test_mkdtemp() +static int test_mkdtemp() { /* FIXME */ return true; } -int test_mkstemp() +static int test_mkstemp() { /* FIXME */ return true; } -int test_pread() +static int test_pread() { /* FIXME */ return true; } -int test_pwrite() +static int test_pwrite() { /* FIXME */ return true; } -int test_getpass() +static int test_getpass() { /* FIXME */ return true; } -int test_inet_ntoa() +static int test_inet_ntoa() { /* FIXME */ return true; } -int test_strtoll() +static int test_strtoll() { /* FIXME */ return true; } -int test_strtoull() +static int test_strtoull() { /* FIXME */ return true; @@ -278,25 +278,25 @@ INT32_MAX */ -int test_va_copy() +static int test_va_copy() { /* FIXME */ return true; } -int test_FUNCTION() +static int test_FUNCTION() { /* FIXME: test __FUNCTION__ macro */ return true; } -int test_MIN() +static int test_MIN() { /* FIXME */ return true; } -int test_MAX() +static int test_MAX() { /* FIXME */ return true;
svn commit: samba r18037 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-04 12:56:14 + (Mon, 04 Sep 2006) New Revision: 18037 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18037 Log: added 'make installcheck' target Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in === --- branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 12:49:17 UTC (rev 18036) +++ branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 12:56:14 UTC (rev 18037) @@ -26,6 +26,8 @@ test: testsuite ./testsuite +installcheck: install test + TEST_OBJS = test/testsuite.o testsuite: libreplace.a $(TEST_OBJS)
Rev 9570: Include header with time_t if needed. in file:///home/jelmer/bzr.samba/4.0-replace/
revno: 9570 committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Mon 2006-09-04 14:55:20 +0200 message: Include header with time_t if needed. modified: source/lib/replace/replace.h
svn commit: samba r18036 - in branches/SAMBA_4_0: . source/lib/ldb
Author: jelmer Date: 2006-09-04 12:49:17 + (Mon, 04 Sep 2006) New Revision: 18036 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18036 Log: Add missing file Added: branches/SAMBA_4_0/source/lib/ldb/configure.ac branches/SAMBA_4_0/source/lib/ldb/replace.m4 Removed: branches/SAMBA_4_0/source/lib/ldb/configure.in Modified: branches/SAMBA_4_0/ Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:merge - [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] + [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Copied: branches/SAMBA_4_0/source/lib/ldb/configure.ac (from rev 18035, branches/SAMBA_4_0/source/lib/ldb/configure.in) === --- branches/SAMBA_4_0/source/lib/ldb/configure.in 2006-09-04 12:39:41 UTC (rev 18035) +++ branches/SAMBA_4_0/source/lib/ldb/configure.ac 2006-09-04 12:49:17 UTC (rev 18036) @@ -0,0 +1,79 @@ +AC_PREREQ(2.50) +AC_DEFUN([AC_CHECK_LIB_EXT], [ + AC_CHECK_LIB([$1],[$3],[$4],[$5],[$7]) + ac_cv_lib_ext_$1_$3=$ac_cv_lib_$1_$3 +]) +AC_DEFUN([AC_CHECK_FUNC_EXT], [ + AC_CHECK_FUNC([$1],[$3],[$4]) + ac_cv_func_ext_$1=$ac_cv_func_$1 +]) +AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""]) +AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""]) +AC_DEFUN([SMB_EXT_LIB], [echo -n ""]) +AC_DEFUN([SMB_ENABLE], [echo -n ""]) +AC_INIT(include/ldb.h) +AC_CONFIG_SRCDIR([common/ldb.c]) +AC_PROG_CC + +if test "$ac_cv_prog_gcc" = yes; then + CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings" +fi + +WITH_GCOV=0 +AC_ARG_ENABLE(gcov, + AS_HELP_STRING([--enable-gcov],[enable GCOV code coverage tests]), + [ WITH_GCOV=1]) +AC_SUBST(WITH_GCOV) +if test x"$with_gcov_support" = x"yes"; then + CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs" + LIBS="$LIBS -lgcov" +fi + +AC_SYS_LARGEFILE +AC_FUNC_MMAP +AC_PATH_PROG(XSLTPROC,xsltproc) +AC_PATH_PROG(DOXYGEN,doxygen) +AC_PATH_PROG(GCOV,gcov) +AC_PATH_PROG(SLAPD,slapd) +AC_CHECK_HEADERS(stdint.h dlfcn.h) +AC_CONFIG_HEADER(include/config.h) +AC_SEARCH_LIBS(dlopen, dl, AC_DEFINE(HAVE_DLOPEN, [1], [have dlopen])) + +SHLIBEXT="so" # Should be set based on OS later on +AC_SUBST(SHLIBEXT) + +AC_DEFINE_UNQUOTED(MODULESDIR, LIBDIR "/ldb" , [Modules directory] ) +AC_SUBST(MODULESDIR) + +TESTS="" +EXTRA_OBJ="" + +sinclude(popt.m4) +sinclude(replace/config.m4) + +sinclude(ldap.m4) +if test x"$with_ldap_support" = x"yes"; then + LIBS="$LIBS -llber -lldap" + CFLAGS="$CFLAGS -DHAVE_LDAP=1" + EXTRA_OBJ="$EXTRA_OBJ ldb_ldap/ldb_ldap.o" + TESTS="$TESTS test-ldap.sh" +fi + +sinclude(sqlite3.m4) +if test x"$with_sqlite3_support" = x"yes"; then + LIBS="$LIBS -lsqlite3" + CFLAGS="$CFLAGS -DHAVE_SQLITE3=1" + EXTRA_OBJ="$EXTRA_OBJ ldb_sqlite3/ldb_sqlite3.o" + TESTS="$TESTS test-sqlite3.sh" +fi + +AC_SUBST(TESTS) +AC_SUBST(EXTRA_OBJ) + +sinclude(replace.m4) +SMB_REPLACE_FUNCS(strtoll) + +sinclude(config.m4) +sinclude(../talloc/config.m4) +sinclude(../tdb/config.m4) +AC_OUTPUT(Makefile ldb.pc) Deleted: branches/SAMBA_4_0/source/lib/ldb/configure.in === --- branches/SAMBA_4_0/source/lib/ldb/configure.in 2006-09-04 12:39:41 UTC (rev 18035) +++ branches/SAMBA_4_0/source/lib/ldb/configure.in 2006-09-04 12:49:17 UTC (rev 18036) @@ -1,79 +0,0 @@ -AC_PREREQ(2.50) -AC_DEFUN([AC_CHECK_LIB_EXT], [ - AC_CHECK_LIB([$1],[$3],[$4],[$5],[$7]) - ac_cv_lib_ext_$1_$3=$ac_cv_lib_$1_$3 -]) -AC_DEFUN([AC_CHECK_FUNC_EXT], [ - AC_CHECK_FUNC([$1],[$3],[$4]) - ac_cv_func_ext_$1=$ac_cv_func_$1 -]) -AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""]) -AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""]) -AC_DEFUN([SMB_EXT_LIB], [echo -n ""]) -AC_DEFUN([SMB_ENABLE], [echo -n ""]) -AC_INIT(include/ldb.h) -AC_CONFIG_SRCDIR([common/ldb.c]) -AC_PROG_CC - -if test "$ac_cv_prog_gcc" = yes; then - CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings" -fi - -WITH_GCOV=0 -AC_ARG_ENABLE(gcov, - AS_HELP_STRING([--enable-gcov],[enable GCOV code coverage tests]), - [ WITH_GCOV=1]) -AC_SUBST(WITH_GCOV) -if test x"$with_gcov_support" = x"yes"; then - CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs" - LIBS="$LIBS -lgcov" -fi - -AC_SYS_LARGEFILE -AC_FUNC_MMAP -AC_PATH_PROG(XSLTPROC,xsltproc) -AC_PATH_PROG(DOXYGEN,doxygen) -AC_PATH_PROG(GCOV,gcov) -AC_PATH_PROG(SLAPD,slapd) -AC_CHECK_HEADERS(stdint.h dlfcn.h) -AC_CONFIG_HEADER(include/config.h) -AC_SEARCH_LIBS(dlopen, dl, AC_DEFINE(HAVE_DLOPEN, [1], [have dlopen])) - -SHLIBEXT="so" # Should be set based on OS later on -AC_SUBST(SHLIBEXT) - -AC_DEFINE_UNQUOTED(MODULESDIR, LIBDIR "/ldb" , [Modules directory] ) -AC_SUBST(MODULESDIR) - -TESTS="" -EXTRA_OBJ="" - -sinclude(popt.m4) -sinclude(replace/config.m4) - -sin
Rev 9569: Add missing file in file:///home/jelmer/bzr.samba/4.0-replace/
revno: 9569 committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Mon 2006-09-04 14:47:21 +0200 message: Add missing file added: source/lib/ldb/replace.m4 renamed: source/lib/ldb/configure.in => source/lib/ldb/configure.ac
svn commit: samba r18035 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-04 12:39:41 + (Mon, 04 Sep 2006) New Revision: 18035 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18035 Log: - fixed 'make clean' to remove test objects - fixed 'make install' to create target dir should be ready to go into the build farm as a standalone build now? Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in === --- branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 12:36:06 UTC (rev 18034) +++ branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 12:39:41 UTC (rev 18035) @@ -16,6 +16,7 @@ all: libreplace.a install: all + mkdir -p $(libdir) $(INSTALL) libreplace.a $(libdir) libreplace.a: $(OBJS) @@ -36,7 +37,7 @@ @$(CC) $(CFLAGS) -c $< -o $@ clean: - rm -f *.o *.a testsuite + rm -f *.o test/*.o *.a testsuite distclean: clean rm -f *~ */*~
svn commit: samba r18034 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-04 12:36:06 + (Mon, 04 Sep 2006) New Revision: 18034 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18034 Log: fixed build of libreplace outside of source directory Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in === --- branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 12:31:40 UTC (rev 18033) +++ branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 12:36:06 UTC (rev 18034) @@ -9,6 +9,8 @@ builddir = @builddir@ INSTALL = @INSTALL@ +CFLAGS=-I. -I$(srcdir) @CFLAGS@ + OBJS = dlfcn.o getpass.o replace.o snprintf.o all: libreplace.a @@ -31,7 +33,7 @@ .c.o: @echo Compiling $*.c @mkdir -p `dirname [EMAIL PROTECTED] - $(CC) $(CFLAGS) -c $< -o $@ + @$(CC) $(CFLAGS) -c $< -o $@ clean: rm -f *.o *.a testsuite
svn commit: samba r18033 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-04 12:31:40 + (Mon, 04 Sep 2006) New Revision: 18033 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18033 Log: added install-sh, needed for standalone libreplace build Added: branches/SAMBA_4_0/source/lib/replace/install-sh Changeset: Added: branches/SAMBA_4_0/source/lib/replace/install-sh === --- branches/SAMBA_4_0/source/lib/replace/install-sh2006-09-04 12:31:23 UTC (rev 18032) +++ branches/SAMBA_4_0/source/lib/replace/install-sh2006-09-04 12:31:40 UTC (rev 18033) @@ -0,0 +1,238 @@ +#! /bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do +case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; +esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@[EMAIL PROTECTED]' -e '[EMAIL PROTECTED]@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; +then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going t
svn commit: samba r18032 - in branches/SAMBA_4_0/source/lib/replace: .
Author: tridge Date: 2006-09-04 12:31:23 + (Mon, 04 Sep 2006) New Revision: 18032 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18032 Log: added a 'make distclean' Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in === --- branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 12:21:42 UTC (rev 18031) +++ branches/SAMBA_4_0/source/lib/replace/Makefile.in 2006-09-04 12:31:23 UTC (rev 18032) @@ -34,4 +34,12 @@ $(CC) $(CFLAGS) -c $< -o $@ clean: - rm -f *.o + rm -f *.o *.a testsuite + +distclean: clean + rm -f *~ */*~ + rm -rf autom4te.cache + rm -f configure \ + config.log config.status \ + replace_config.h + rm -f Makefile
svn commit: samba r18031 - in branches/SAMBA_4_0: . source/dsdb/samdb/ldb_modules source/heimdal/lib/com_err source/heimdal/lib/hdb source/heimdal_build source/lib/ldb source/lib/ldb/include source/li
Author: jelmer Date: 2006-09-04 12:21:42 + (Mon, 04 Sep 2006) New Revision: 18031 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18031 Log: Merge my replace fixes: * libreplace can now build stand-alone * add stub testsuite for libreplace * make talloc/tdb/ldb use libreplace Added: branches/SAMBA_4_0/source/lib/replace/Makefile.in branches/SAMBA_4_0/source/lib/replace/autogen.sh branches/SAMBA_4_0/source/lib/replace/configure.ac branches/SAMBA_4_0/source/lib/replace/replace.m4 branches/SAMBA_4_0/source/lib/replace/test/ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c branches/SAMBA_4_0/source/lib/replace/timegm.c branches/SAMBA_4_0/source/lib/talloc/configure.ac branches/SAMBA_4_0/source/lib/tdb/configure.ac Removed: branches/SAMBA_4_0/source/lib/ldb/replace/ branches/SAMBA_4_0/source/lib/talloc/configure.in branches/SAMBA_4_0/source/lib/tdb/configure.in Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/.bzrignore branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk branches/SAMBA_4_0/source/heimdal/lib/com_err/lex.c branches/SAMBA_4_0/source/heimdal/lib/hdb/hdb.c branches/SAMBA_4_0/source/heimdal_build/config.h branches/SAMBA_4_0/source/lib/ldb/Makefile.in branches/SAMBA_4_0/source/lib/ldb/autogen.sh branches/SAMBA_4_0/source/lib/ldb/config.mk branches/SAMBA_4_0/source/lib/ldb/configure.in branches/SAMBA_4_0/source/lib/ldb/include/includes.h branches/SAMBA_4_0/source/lib/replace/README branches/SAMBA_4_0/source/lib/replace/config.m4 branches/SAMBA_4_0/source/lib/replace/config.mk branches/SAMBA_4_0/source/lib/replace/dlfcn.c branches/SAMBA_4_0/source/lib/replace/getpass.c branches/SAMBA_4_0/source/lib/replace/repdir/repdir.c branches/SAMBA_4_0/source/lib/replace/replace.c branches/SAMBA_4_0/source/lib/replace/replace.h branches/SAMBA_4_0/source/lib/replace/snprintf.c branches/SAMBA_4_0/source/lib/talloc/config.mk branches/SAMBA_4_0/source/lib/tdb/Makefile.in Changeset: Sorry, the patch is too large (4165 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18031
Rev 9564: Merge my replace fixes: in file:///home/jelmer/bzr.samba/4.0/
revno: 9564 committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: libndr timestamp: Mon 2006-09-04 14:17:18 +0200 message: Merge my replace fixes: * libreplace can now build stand-alone * add stub testsuite for libreplace * make talloc/tdb/ldb use libreplace removed: source/lib/ldb/replace/ source/lib/ldb/replace/config.m4 source/lib/ldb/replace/replace.c added: source/lib/replace/Makefile.in source/lib/replace/autogen.sh source/lib/replace/configure.ac source/lib/replace/replace.m4 source/lib/replace/test/ source/lib/replace/test/testsuite.c renamed: source/lib/ldb/replace/timegm.c => source/lib/replace/timegm.c source/lib/talloc/configure.in => source/lib/talloc/configure.ac source/lib/tdb/configure.in => source/lib/tdb/configure.ac modified: .bzrignore source/dsdb/samdb/ldb_modules/config.mk source/heimdal/lib/com_err/lex.c source/heimdal/lib/hdb/hdb.c source/heimdal_build/config.h source/lib/ldb/Makefile.in source/lib/ldb/autogen.sh source/lib/ldb/config.mk source/lib/ldb/configure.in source/lib/ldb/include/includes.h source/lib/replace/README source/lib/replace/config.m4 source/lib/replace/config.mk source/lib/replace/dlfcn.c source/lib/replace/getpass.c source/lib/replace/repdir/repdir.c source/lib/replace/replace.c source/lib/replace/replace.h source/lib/replace/snprintf.c source/lib/talloc/config.mk source/lib/tdb/Makefile.in merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Mon 2006-09-04 13:53:05 +0200 message: Add test for __VA_ARGS__ merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Sun 2006-09-03 17:40:21 +0200 message: Fix large build. merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Tue 2006-08-29 12:17:43 +0100 message: Add stubs to the testsuite. merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Tue 2006-08-29 11:58:23 +0100 message: Change license to LGPL, start working on testsuite merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Tue 2006-08-29 10:12:05 +0100 message: Add rules for installation merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Mon 2006-08-28 19:12:59 +0100 message: [merge] 4.0 upstream merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Mon 2006-08-28 15:57:36 +0100 message: Use new autoconf input file name merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Mon 2006-08-28 15:55:54 +0100 message: Use new name for autoconf input. merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Mon 2006-08-28 15:53:25 +0100 message: Rename config.h for libreplace to replace_config.h to avoid priority problems. Support intptr_t merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Fri 2006-08-25 18:16:01 +0200 message: Don't use includes.h as it is not available in standalone mode. merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Fri 2006-08-25 18:15:14 +0200 message: Build win32 and repdir subdirs in standalone mode as well. merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Fri 2006-08-25 17:40:06 +0200 message: Add autogen.sh for libreplace, fix the one for ldb. merged: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: rep
Re: svn commit: samba r18030 - in branches/SAMBA_3_0/source/tdb/common: .
Volker, > When compiling with C++, nested structs lead to nested class definitions > which > are not compatible. I am aware that this would be a huge change in Samba4, > but > I would like to see it in the code that is shared. this may be a step too far. C and C++ are different languages, and while it is useful to be able to get warnings from g++ is nice, I don't think it should lead us to worse coding practices. Nesting structure definitions keeps structure definitions cleaner, and keeps related structures closer together. Do you actually have plans to use real C++ somewhere with the Samba code, or is this purely for the warnings? Perhaps it might gain more to put some effort into adapting sparse for warnings that are applicable to Samba code? It is a much more powerful static analyser than g++ ever will be, and doesn't require a change of language :-) Cheers, Tridge
Rev 9496: Add test for __VA_ARGS__ in file:///home/jelmer/bzr.samba/4.0-replace/
revno: 9496 committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: replace timestamp: Mon 2006-09-04 13:53:05 +0200 message: Add test for __VA_ARGS__ modified: source/lib/replace/config.m4
svn commit: smb-build r67 - in trunk: . build/m4 build/smb_build
Author: jelmer Date: 2006-09-04 11:28:24 + (Mon, 04 Sep 2006) New Revision: 67 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=smb-build&rev=67 Log: Test availability of __VA_ARGS__ Added: trunk/foo.c Modified: trunk/Makefile.in trunk/build/m4/rewrite.m4 trunk/build/smb_build/makefile.pm Changeset: Sorry, the patch is too large (367 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=smb-build&rev=67
Rev 9127: Add some macros to make using the ui API easier. in file:///home/jelmer/bzr.samba/4.0-unittest/
revno: 9127 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: unittest timestamp: Mon 2006-09-04 12:43:45 +0200 message: Add some macros to make using the ui API easier. added: source/torture/torture-dummy.h torturedummy.h-20060904015825-q6pfqeb8jgju5exd-1 modified: source/torture/local/irpc.csvn-v1:[EMAIL PROTECTED] source/torture/ui.csvn-v1:[EMAIL PROTECTED] source/torture/ui.hsvn-v1:[EMAIL PROTECTED]
Re: svn commit: samba r18030 - in branches/SAMBA_3_0/source/tdb/common: .
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] schrieb: > Author: vlendec > Date: 2006-09-04 10:12:04 + (Mon, 04 Sep 2006) > New Revision: 18030 > > WebSVN: > http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18030 > > Log: > When compiling with C++, nested structs lead to nested class definitions which > are not compatible. I am aware that this would be a huge change in Samba4, but > I would like to see it in the code that is shared. Hi Volker, Does this also apply to unnamed substructures? like this: struct foo { int bla; struct { int val1; int val1; } vals; }; and what's with unions with unnamed substructs? like this: union foo { struct { struct { int val1; } in; struct { int val2; } out; } level1; }; metze -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFE+/30m70gjA5TCD8RAjXzAJ9m/wOTXDvDp726ScPn2fKNaP0Q/wCeNBNh 1iuMAbLtGaq9Y7AdNb2k9RE= =V1I+ -END PGP SIGNATURE-
svn commit: samba r18030 - in branches/SAMBA_3_0/source/tdb/common: .
Author: vlendec Date: 2006-09-04 10:12:04 + (Mon, 04 Sep 2006) New Revision: 18030 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18030 Log: When compiling with C++, nested structs lead to nested class definitions which are not compatible. I am aware that this would be a huge change in Samba4, but I would like to see it in the code that is shared. Stefan, when you do merge work, can you get this across to Samba4? Thanks, Volker Modified: branches/SAMBA_3_0/source/tdb/common/transaction.c Changeset: Modified: branches/SAMBA_3_0/source/tdb/common/transaction.c === --- branches/SAMBA_3_0/source/tdb/common/transaction.c 2006-09-04 09:51:47 UTC (rev 18029) +++ branches/SAMBA_3_0/source/tdb/common/transaction.c 2006-09-04 10:12:04 UTC (rev 18030) @@ -88,6 +88,12 @@ */ +struct tdb_transaction_el { + struct tdb_transaction_el *next, *prev; + tdb_off_t offset; + tdb_len_t length; + unsigned char *data; +}; /* hold the context of any current transaction @@ -105,12 +111,7 @@ ordered, with first element at the front of the list. It needs to be doubly linked as the read/write traversals need to be backwards, while the commit needs to be forwards */ - struct tdb_transaction_el { - struct tdb_transaction_el *next, *prev; - tdb_off_t offset; - tdb_len_t length; - unsigned char *data; - } *elements, *elements_last; + struct tdb_transaction_el *elements, *elements_last; /* non-zero when an internal transaction error has occurred. All write operations will then fail until the
svn commit: samba r18029 - in branches/SAMBA_3_0/source: auth lib libsmb rpc_parse utils
Author: vlendec Date: 2006-09-04 09:51:47 + (Mon, 04 Sep 2006) New Revision: 18029 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18029 Log: More C++ stuff Modified: branches/SAMBA_3_0/source/auth/auth_util.c branches/SAMBA_3_0/source/lib/snprintf.c branches/SAMBA_3_0/source/libsmb/ntlm_check.c branches/SAMBA_3_0/source/libsmb/ntlmssp.c branches/SAMBA_3_0/source/rpc_parse/parse_prs.c branches/SAMBA_3_0/source/utils/ntlm_auth.c branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c Changeset: Modified: branches/SAMBA_3_0/source/auth/auth_util.c === --- branches/SAMBA_3_0/source/auth/auth_util.c 2006-09-04 09:29:50 UTC (rev 18028) +++ branches/SAMBA_3_0/source/auth/auth_util.c 2006-09-04 09:51:47 UTC (rev 18029) @@ -1374,7 +1374,7 @@ struct samu *sampass = NULL; DOM_SID guest_sid; BOOL ret; - static const char zeros[16]; + static const char zeros[16] = { 0, }; if ( !(sampass = samu_new( NULL )) ) { return NT_STATUS_NO_MEMORY; @@ -1691,7 +1691,7 @@ auth_serversupplied_info **server_info, NET_USER_INFO_3 *info3) { - static const char zeros[16]; + static const char zeros[16] = { 0, }; NTSTATUS nt_status = NT_STATUS_OK; char *found_username; Modified: branches/SAMBA_3_0/source/lib/snprintf.c === --- branches/SAMBA_3_0/source/lib/snprintf.c2006-09-04 09:29:50 UTC (rev 18028) +++ branches/SAMBA_3_0/source/lib/snprintf.c2006-09-04 09:51:47 UTC (rev 18029) @@ -629,7 +629,7 @@ break; case CNK_PTR: - cnk->strvalue = va_arg (args, void *); + cnk->strvalue = (char *)va_arg (args, void *); for (i = 1; i < clist[pnum].num; i++) { clist[pnum].chunks[i]->strvalue = cnk->strvalue; } Modified: branches/SAMBA_3_0/source/libsmb/ntlm_check.c === --- branches/SAMBA_3_0/source/libsmb/ntlm_check.c 2006-09-04 09:29:50 UTC (rev 18028) +++ branches/SAMBA_3_0/source/libsmb/ntlm_check.c 2006-09-04 09:51:47 UTC (rev 18029) @@ -183,7 +183,7 @@ DATA_BLOB *user_sess_key, DATA_BLOB *lm_sess_key) { - static const unsigned char zeros[8]; + static const unsigned char zeros[8] = { 0, }; if (nt_pw == NULL) { DEBUG(3,("ntlm_password_check: NO NT password stored for user %s.\n", username)); Modified: branches/SAMBA_3_0/source/libsmb/ntlmssp.c === --- branches/SAMBA_3_0/source/libsmb/ntlmssp.c 2006-09-04 09:29:50 UTC (rev 18028) +++ branches/SAMBA_3_0/source/libsmb/ntlmssp.c 2006-09-04 09:51:47 UTC (rev 18029) @@ -1062,7 +1062,7 @@ } if (!ntlmssp_state->nt_hash || !ntlmssp_state->lm_hash) { - static const uchar zeros[16]; + static const uchar zeros[16] = { 0, }; /* do nothing - blobs are zero length */ /* session key is all zeros */ Modified: branches/SAMBA_3_0/source/rpc_parse/parse_prs.c === --- branches/SAMBA_3_0/source/rpc_parse/parse_prs.c 2006-09-04 09:29:50 UTC (rev 18028) +++ branches/SAMBA_3_0/source/rpc_parse/parse_prs.c 2006-09-04 09:51:47 UTC (rev 18029) @@ -1626,7 +1626,7 @@ uchar digest_final[16]; uchar confounder[8]; uchar seq_num[8]; - static const uchar nullbytes[8]; + static const uchar nullbytes[8] = { 0, }; static const uchar schannel_seal_sig[8] = SCHANNEL_SEAL_SIGNATURE; static const uchar schannel_sign_sig[8] = SCHANNEL_SIGN_SIGNATURE; Modified: branches/SAMBA_3_0/source/utils/ntlm_auth.c === --- branches/SAMBA_3_0/source/utils/ntlm_auth.c 2006-09-04 09:29:50 UTC (rev 18028) +++ branches/SAMBA_3_0/source/utils/ntlm_auth.c 2006-09-04 09:51:47 UTC (rev 18029) @@ -479,7 +479,7 @@ static NTSTATUS winbind_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *user_session_key, DATA_BLOB *lm_session_key) { - static const char zeros[16]; + static const char zeros[16] = { 0, }; NTSTATUS nt_status; char *error_string; uint8 lm_key[8]; Modified: branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c === --- branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c 2006-09-04 09:29:50 UTC (rev 18028) +++ branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c 2006-09-
svn commit: samba r18028 - in branches/SAMBA_3_0/source/nsswitch: .
Author: vlendec Date: 2006-09-04 09:29:50 + (Mon, 04 Sep 2006) New Revision: 18028 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18028 Log: Fix warnings on non-krb5 systems Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2006-09-04 08:55:58 UTC (rev 18027) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2006-09-04 09:29:50 UTC (rev 18028) @@ -72,10 +72,12 @@ { struct WINBINDD_CCACHE_ENTRY *entry = talloc_get_type_abort(private_data, struct WINBINDD_CCACHE_ENTRY); +#ifdef HAVE_KRB5 int ret; time_t new_start; struct timeval t; struct WINBINDD_MEMORY_CREDS *cred_ptr = entry->cred_ptr; +#endif DEBUG(10,("krb5_ticket_refresh_handler called\n")); DEBUGADD(10,("event called for: %s, %s\n", entry->ccname, entry->username)); Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c 2006-09-04 08:55:58 UTC (rev 18027) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c 2006-09-04 09:29:50 UTC (rev 18028) @@ -321,6 +321,8 @@ return NT_STATUS_OK; } +#ifdef HAVE_KRB5 + static const char *generate_krb5_ccache(TALLOC_CTX *mem_ctx, const char *type, uid_t uid, @@ -368,19 +370,6 @@ return gen_cc; } -static uid_t get_uid_from_state(struct winbindd_cli_state *state) -{ - uid_t uid = -1; - - uid = state->request.data.auth.uid; - - if (uid < 0) { - DEBUG(1,("invalid uid: '%d'\n", uid)); - return -1; - } - return uid; -} - static void setup_return_cc_name(struct winbindd_cli_state *state, const char *cc) { const char *type = state->request.data.auth.krb5_cc_type; @@ -401,6 +390,21 @@ fstrcpy(state->response.data.auth.krb5ccname, cc); } +#endif + +static uid_t get_uid_from_state(struct winbindd_cli_state *state) +{ + uid_t uid = -1; + + uid = state->request.data.auth.uid; + + if (uid < 0) { + DEBUG(1,("invalid uid: '%d'\n", uid)); + return -1; + } + return uid; +} + /** Authenticate a user with a clear text password using Kerberos and fill up ccache if required @@ -1852,7 +1856,9 @@ struct winbindd_cli_state *state) { NTSTATUS result = NT_STATUS_NOT_SUPPORTED; +#ifdef HAVE_KRB5 int ret; +#endif DEBUG(3, ("[%5lu]: pam dual logoff %s\n", (unsigned long)state->pid, state->request.data.logoff.user));
svn commit: samba r18027 - in branches: SAMBA_3_0/source/lib SAMBA_4_0/source/lib/talloc
Author: vlendec Date: 2006-09-04 08:55:58 + (Mon, 04 Sep 2006) New Revision: 18027 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18027 Log: Fix some 64-bit warnings Modified: branches/SAMBA_3_0/source/lib/talloc.c branches/SAMBA_3_0/source/lib/talloctort.c branches/SAMBA_4_0/source/lib/talloc/talloc.c branches/SAMBA_4_0/source/lib/talloc/testsuite.c Changeset: Modified: branches/SAMBA_3_0/source/lib/talloc.c === --- branches/SAMBA_3_0/source/lib/talloc.c 2006-09-04 04:54:20 UTC (rev 18026) +++ branches/SAMBA_3_0/source/lib/talloc.c 2006-09-04 08:55:58 UTC (rev 18027) @@ -890,7 +890,7 @@ name, (unsigned long)talloc_total_size(ptr), (unsigned long)talloc_total_blocks(ptr), - talloc_reference_count(ptr)); + (int)talloc_reference_count(ptr)); } /* Modified: branches/SAMBA_3_0/source/lib/talloctort.c === --- branches/SAMBA_3_0/source/lib/talloctort.c 2006-09-04 04:54:20 UTC (rev 18026) +++ branches/SAMBA_3_0/source/lib/talloctort.c 2006-09-04 08:55:58 UTC (rev 18027) @@ -960,8 +960,10 @@ s1 = talloc_ptrtype(top, s1);location1 = __location__; if (talloc_get_size(s1) != sizeof(struct struct1)) { - printf("%s: talloc_ptrtype() allocated the wrong size %u (should be %u)\n", - __location__, talloc_get_size(s1), sizeof(struct struct1)); + printf("%s: talloc_ptrtype() allocated the wrong size %lu " + "(should be %lu)\n", + __location__, (unsigned long)talloc_get_size(s1), + (unsigned long)sizeof(struct struct1)); ret = False; } @@ -974,22 +976,27 @@ s2 = talloc_array_ptrtype(top, s2, 10);location2 = __location__; if (talloc_get_size(s2) != (sizeof(struct struct1) * 10)) { - printf("%s: talloc_array_ptrtype() allocated the wrong size %u (should be %u)\n", - __location__, talloc_get_size(s2), (sizeof(struct struct1)*10)); + printf("%s: talloc_array_ptrtype() allocated the wrong size " + "%lu (should be %lu)\n", + __location__, (unsigned long)talloc_get_size(s2), + (unsigned long)(sizeof(struct struct1)*10)); ret = False; } if (strcmp(location2, talloc_get_name(s2)) != 0) { printf("%s: talloc_array_ptrtype() sets the wrong name '%s' (should be '%s')\n", - __location__, talloc_get_name(s2), location2); + __location__, talloc_get_name(s2), + location2); ret = False; } s3 = talloc_array_ptrtype(top, s3, 10);location3 = __location__; if (talloc_get_size(s3) != (sizeof(struct struct1 *) * 10)) { - printf("%s: talloc_array_ptrtype() allocated the wrong size %u (should be %u)\n", - __location__, talloc_get_size(s3), (sizeof(struct struct1 *)*10)); + printf("%s: talloc_array_ptrtype() allocated the wrong size " + "%lu (should be %lu)\n", + __location__, (unsigned long)talloc_get_size(s3), + (unsigned long)(sizeof(struct struct1 *)*10)); ret = False; } @@ -1002,8 +1009,10 @@ s4 = talloc_array_ptrtype(top, s4, 10);location4 = __location__; if (talloc_get_size(s4) != (sizeof(struct struct1 **) * 10)) { - printf("%s: talloc_array_ptrtype() allocated the wrong size %u (should be %u)\n", - __location__, talloc_get_size(s4), (sizeof(struct struct1 **)*10)); + printf("%s: talloc_array_ptrtype() allocated the wrong size " + "%lu (should be %lu)\n", + __location__, (unsigned long)talloc_get_size(s4), + (unsigned long)(sizeof(struct struct1 **)*10)); ret = False; } Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.c === --- branches/SAMBA_4_0/source/lib/talloc/talloc.c 2006-09-04 04:54:20 UTC (rev 18026) +++ branches/SAMBA_4_0/source/lib/talloc/talloc.c 2006-09-04 08:55:58 UTC (rev 18027) @@ -890,7 +890,7 @@ name, (unsigned long)talloc_total_size(ptr), (unsigned long)talloc_total_blocks(ptr), - talloc_reference_count(ptr)); + (int)talloc_reference_count(ptr)); } /* Modified: branches/SAMBA_4_0/source/lib/talloc/testsuite.c === --- branches/SAMBA_4_0/source/lib/talloc/testsuite.c2006-09-04 04:54:20 UT
Re: svn commit: samba r18012 - in branches/SAMBA_3_0: examples/libsmbclient source/libsmb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] schrieb: > Author: derrell > Date: 2006-09-03 01:37:26 + (Sun, 03 Sep 2006) > New Revision: 18012 > > WebSVN: > http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18012 > > Log: > Should fix bug 4018. > > NetApp filers expect paths in Open AndX Request to have a leading slash. > Windows clients send the leading slash, so we should too. Hi Derrell, a torture test for this would be nice:-) metze -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFE++ekm70gjA5TCD8RAiD2AJwPcEWMVJEPFkkmuTuKQGSgHOwl7wCeLtT9 szqSLRWwI5Xo457ww6VuNO4= =2pD0 -END PGP SIGNATURE-