svn commit: samba r18605 - in branches/SAMBA_3_0/source: auth include lib libsmb nmbd nsswitch printing registry smbd tdb/common

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 07:52:16 + (Mon, 18 Sep 2006)
New Revision: 18605

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18605

Log:
sync dlinklist.h with samba4, that means DLIST_ADD_END()
and DLIST_DEMOTE() now take the type of the tmp pointer
not the tmp pointer itself anymore.

metze

Modified:
   branches/SAMBA_3_0/source/auth/auth.c
   branches/SAMBA_3_0/source/include/dlinklist.h
   branches/SAMBA_3_0/source/lib/smbldap.c
   branches/SAMBA_3_0/source/libsmb/cliconnect.c
   branches/SAMBA_3_0/source/nmbd/nmbd_browserdb.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0/source/printing/notify.c
   branches/SAMBA_3_0/source/registry/regfio.c
   branches/SAMBA_3_0/source/smbd/blocking.c
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/posix_acls.c
   branches/SAMBA_3_0/source/smbd/process.c
   branches/SAMBA_3_0/source/smbd/trans2.c
   branches/SAMBA_3_0/source/tdb/common/tdbutil.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth.c
===
--- branches/SAMBA_3_0/source/auth/auth.c   2006-09-18 04:19:13 UTC (rev 
18604)
+++ branches/SAMBA_3_0/source/auth/auth.c   2006-09-18 07:52:16 UTC (rev 
18605)
@@ -432,7 +432,6 @@
 {
auth_methods *list = NULL;
auth_methods *t = NULL;
-   auth_methods *tmp;
NTSTATUS nt_status;
 
if (!text_list) {
@@ -445,7 +444,7 @@
 
for (;*text_list; text_list++) { 
if (load_auth_module(*auth_context, *text_list, t)) {
-   DLIST_ADD_END(list, t, tmp);
+   DLIST_ADD_END(list, t, auth_methods *);
}
}


Modified: branches/SAMBA_3_0/source/include/dlinklist.h
===
--- branches/SAMBA_3_0/source/include/dlinklist.h   2006-09-18 04:19:13 UTC 
(rev 18604)
+++ branches/SAMBA_3_0/source/include/dlinklist.h   2006-09-18 07:52:16 UTC 
(rev 18605)
@@ -21,10 +21,13 @@
 /* To use these macros you must have a structure containing a next and
prev pointer */
 
+#ifndef _DLINKLIST_H
+#define _DLINKLIST_H
 
+
 /* hook into the front of the list */
 #define DLIST_ADD(list, p) \
-{ \
+do { \
 if (!(list)) { \
(list) = (p); \
(p)-next = (p)-prev = NULL; \
@@ -34,11 +37,11 @@
(p)-prev = NULL; \
(list) = (p); \
}\
-}
+} while (0)
 
 /* remove an element from a list - element doesn't have to be in list. */
 #define DLIST_REMOVE(list, p) \
-{ \
+do { \
if ((p) == (list)) { \
(list) = (p)-next; \
if (list) (list)-prev = NULL; \
@@ -47,28 +50,29 @@
if ((p)-next) (p)-next-prev = (p)-prev; \
} \
if ((p) != (list)) (p)-next = (p)-prev = NULL; \
-}
+} while (0)
 
 /* promote an element to the top of the list */
 #define DLIST_PROMOTE(list, p) \
-{ \
-  DLIST_REMOVE(list, p) \
-  DLIST_ADD(list, p) \
-}
+do { \
+  DLIST_REMOVE(list, p); \
+  DLIST_ADD(list, p); \
+} while (0)
 
 /* hook into the end of the list - needs a tmp pointer */
-#define DLIST_ADD_END(list, p, tmp) \
-{ \
+#define DLIST_ADD_END(list, p, type) \
+do { \
if (!(list)) { \
(list) = (p); \
(p)-next = (p)-prev = NULL; \
} else { \
-   for ((tmp) = (list); (tmp)-next; (tmp) = (tmp)-next) 
; \
-   (tmp)-next = (p); \
+   type tmp; \
+   for (tmp = (list); tmp-next; tmp = tmp-next) ; \
+   tmp-next = (p); \
(p)-next = NULL; \
-   (p)-prev = (tmp); \
+   (p)-prev = tmp; \
} \
-}
+} while (0)
 
 /* insert 'p' after the given element 'el' in a list. If el is NULL then
this is the same as a DLIST_ADD() */
@@ -84,9 +88,27 @@
}\
 } while (0)
 
-/* demote an element to the top of the list, needs a tmp pointer */
+/* demote an element to the end of the list, needs a tmp pointer */
 #define DLIST_DEMOTE(list, p, tmp) \
-{ \
-   DLIST_REMOVE(list, p) \
-   DLIST_ADD_END(list, p, tmp) \
-}
+do { \
+   DLIST_REMOVE(list, p); \
+   DLIST_ADD_END(list, p, tmp); \
+} while (0)
+
+/* concatenate two lists - putting all elements of the 2nd list at the
+   end of the first list */
+#define DLIST_CONCATENATE(list1, list2, type) \
+do { \
+   if (!(list1)) { \
+   (list1) = (list2); \
+   } else { \
+   type tmp; \
+   for (tmp = (list1); tmp-next; tmp = tmp-next) ; \
+   tmp-next = (list2); \
+   if (list2) { \
+   (list2)-prev = tmp;\
+   

svn commit: samba r18606 - in branches/SAMBA_3_0/source: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 08:55:35 + (Mon, 18 Sep 2006)
New Revision: 18606

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18606

Log:
- fix the detection of the working quota implementation
- we now define the set of samba related include path in one place
  so that we can't get it wrong in different places

metze

Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2006-09-18 07:52:16 UTC (rev 
18605)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-09-18 08:55:35 UTC (rev 
18606)
@@ -121,7 +121,7 @@
 LIBADDNS_MAJOR=0
 LIBADDNS_MINOR=1
 
-FLAGS1 = $(CFLAGS) @FLAGS1@ -Iinclude -I$(srcdir)/include 
-I$(srcdir)/tdb/include @SMBWRAP_INC@ -I. $(CPPFLAGS) -I$(srcdir) 
-D_SAMBA_BUILD_  -I$(srcdir)/libaddns -I$(srcdir)/librpc
+FLAGS1 = $(CFLAGS) @FLAGS1@ @SAMBA_CPPFLAGS@ @SMBWRAP_INC@ $(CPPFLAGS)
 FLAGS2 =
 FLAGS3 = 
 FLAGS4 = 

Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-09-18 07:52:16 UTC (rev 
18605)
+++ branches/SAMBA_3_0/source/configure.in  2006-09-18 08:55:35 UTC (rev 
18606)
@@ -227,6 +227,14 @@
 done
 ])
 
+SAMBA_CPPFLAGS=-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}
+SAMBA_CPPFLAGS=${SAMBA_CPPFLAGS} -I${srcdir-.}/tdb/include
+SAMBA_CPPFLAGS=${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns
+SAMBA_CPPFLAGS=${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc
+SAMBA_CPPFLAGS=${SAMBA_CPPFLAGS} -D_SAMBA_BUILD_
+
+SAMBA_CONFIGURE_CPPFLAGS=${SAMBA_CPPFLAGS} -I${srcdir-.}/popt
+
 AC_SUBST(configdir)
 AC_SUBST(lockdir)
 AC_SUBST(piddir)
@@ -239,6 +247,7 @@
 AC_SUBST(pammodulesdir)
 
 dnl Unique-to-Samba variables we'll be playing with.
+AC_SUBST(SAMBA_CPPFLAGS)
 AC_SUBST(SHELL)
 AC_SUBST(LDSHFLAGS)
 AC_SUBST(SONAMEFLAG)
@@ -2683,7 +2692,7 @@
 
 AC_CACHE_CHECK([whether getpass should be replaced],samba_cv_REPLACE_GETPASS,[
 SAVE_CPPFLAGS=$CPPFLAGS
-CPPFLAGS=$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx 
-I${srcdir-.}/popt
+CPPFLAGS=$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}
 AC_TRY_COMPILE([
 #define REPLACE_GETPASS 1
 #define NO_PROTO_H 1
@@ -4313,7 +4322,7 @@
 if test x$samba_cv_SYSQUOTA_FOUND != xno; then
 AC_CACHE_CHECK([whether the sys_quota interface 
works],samba_cv_SYSQUOTA_WORKS,[
 SAVE_CPPFLAGS=$CPPFLAGS
-CPPFLAGS=$CPPFLAGS -I${srcdir-.}/ -I. -I${srcdir-.}/include 
-I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/nsswitch
+CPPFLAGS=$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}
 AC_TRY_COMPILE([
 #include confdefs.h
 #define NO_PROTO_H 1
@@ -4340,7 +4349,7 @@
 if test x$samba_cv_SYSQUOTA_FOUND != xno -a x$samba_cv_found_xfs_header 
= xyes; then
 AC_CACHE_CHECK([whether the sys_quota interface works with 
XFS],samba_cv_SYSQUOTA_WORKS_XFS,[
 SAVE_CPPFLAGS=$CPPFLAGS
-CPPFLAGS=$CPPFLAGS -I${srcdir-.}/ -I. -I${srcdir-.}/include 
-I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/nsswitch
+CPPFLAGS=$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}
 AC_TRY_COMPILE([
 #include confdefs.h
 #define NO_PROTO_H 1
@@ -4360,7 +4369,7 @@
 
 AC_CACHE_CHECK([whether the old quota support works],samba_cv_QUOTA_WORKS,[
 SAVE_CPPFLAGS=$CPPFLAGS
-CPPFLAGS=$CPPFLAGS -I${srcdir-.}/ -I. -I${srcdir-.}/include 
-I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/nsswitch
+CPPFLAGS=$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}
 AC_TRY_COMPILE([
 #include confdefs.h
 #define NO_PROTO_H 1



svn commit: samba r18607 - in branches/SAMBA_4_0/source/libnet: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 09:02:50 + (Mon, 18 Sep 2006)
New Revision: 18607

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18607

Log:
remove unused structure element

rafal: is there a reason why we don't use libnet_AddShare() in the torture test?

metze
Modified:
   branches/SAMBA_4_0/source/libnet/libnet_share.c
   branches/SAMBA_4_0/source/libnet/libnet_share.h


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_share.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_share.c 2006-09-18 08:55:35 UTC 
(rev 18606)
+++ branches/SAMBA_4_0/source/libnet/libnet_share.c 2006-09-18 09:02:50 UTC 
(rev 18607)
@@ -130,7 +130,7 @@
return status;
}
 
-   s.in.level  = r-in.level;
+   s.in.level  = 2;
s.in.info.info2 = r-in.share;
s.in.server_unc = talloc_asprintf(mem_ctx, %s, 
r-in.server_name);
  

Modified: branches/SAMBA_4_0/source/libnet/libnet_share.h
===
--- branches/SAMBA_4_0/source/libnet/libnet_share.h 2006-09-18 08:55:35 UTC 
(rev 18606)
+++ branches/SAMBA_4_0/source/libnet/libnet_share.h 2006-09-18 09:02:50 UTC 
(rev 18607)
@@ -47,7 +47,6 @@
enum libnet_AddShare_level level;
struct {
const char * server_name;
-   uint32_t level;
struct srvsvc_NetShareInfo2 share;  
} in;
struct {



svn commit: samba r18608 - in branches/SAMBA_3_0/source: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 09:05:23 + (Mon, 18 Sep 2006)
New Revision: 18608

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18608

Log:
-D_SAMBA_BUILD_ was already added in another place to CFLAGS
so we don't need it twice

metze

Modified:
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-09-18 09:02:50 UTC (rev 
18607)
+++ branches/SAMBA_3_0/source/configure.in  2006-09-18 09:05:23 UTC (rev 
18608)
@@ -231,7 +231,6 @@
 SAMBA_CPPFLAGS=${SAMBA_CPPFLAGS} -I${srcdir-.}/tdb/include
 SAMBA_CPPFLAGS=${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns
 SAMBA_CPPFLAGS=${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc
-SAMBA_CPPFLAGS=${SAMBA_CPPFLAGS} -D_SAMBA_BUILD_
 
 SAMBA_CONFIGURE_CPPFLAGS=${SAMBA_CPPFLAGS} -I${srcdir-.}/popt
 



svn commit: samba r18609 - in branches/SAMBA_4_0/source/libnet: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 09:54:44 + (Mon, 18 Sep 2006)
New Revision: 18609

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18609

Log:
error_string should not contain newlines.

Guenther

Modified:
   branches/SAMBA_4_0/source/libnet/libnet_join.c
   branches/SAMBA_4_0/source/libnet/libnet_passwd.c
   branches/SAMBA_4_0/source/libnet/libnet_samdump.c
   branches/SAMBA_4_0/source/libnet/libnet_share.c
   branches/SAMBA_4_0/source/libnet/libnet_time.c
   branches/SAMBA_4_0/source/libnet/libnet_vampire.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_join.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_join.c  2006-09-18 09:05:23 UTC 
(rev 18608)
+++ branches/SAMBA_4_0/source/libnet/libnet_join.c  2006-09-18 09:54:44 UTC 
(rev 18609)
@@ -248,7 +248,7 @@
ret = ldb_search(remote_ldb, account_dn, LDB_SCOPE_BASE, 
 NULL, attrs, res);
if (ret != LDB_SUCCESS || res-count != 1) {
-   r-out.error_string = talloc_asprintf(r, ldb_search for %s 
failed - %s\n,
+   r-out.error_string = talloc_asprintf(r, ldb_search for %s 
failed - %s,
  account_dn_str, 
ldb_errstring(remote_ldb));
talloc_free(tmp_ctx);
return NT_STATUS_UNSUCCESSFUL;
@@ -313,7 +313,7 @@
if (rtn != 0) {
r-out.error_string
= talloc_asprintf(r, 
- Failed to replace entries on 
%s\n, 
+ Failed to replace entries on 
%s, 
  ldb_dn_linearize(tmp_ctx, 
msg-dn));
talloc_free(tmp_ctx);
return NT_STATUS_INTERNAL_DB_CORRUPTION;
@@ -335,7 +335,7 @@
if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
r-out.error_string
= talloc_asprintf(r,
- dcerpc_drsuapi_DsCrackNames 
for [%s] failed - %s\n, 
+ dcerpc_drsuapi_DsCrackNames 
for [%s] failed - %s, 
  r-in.domain_name, 
  dcerpc_errstr(tmp_ctx, 
drsuapi_pipe-last_fault_code));
talloc_free(tmp_ctx);
@@ -343,7 +343,7 @@
} else {
r-out.error_string
= talloc_asprintf(r,
- dcerpc_drsuapi_DsCrackNames 
for [%s] failed - %s\n, 
+ dcerpc_drsuapi_DsCrackNames 
for [%s] failed - %s, 
  r-in.domain_name, 
  nt_errstr(status));
talloc_free(tmp_ctx);
@@ -602,7 +602,7 @@
/* check if we got one RID for the user */
if (ln.out.rids.count != 1) {
r-out.error_string = talloc_asprintf(mem_ctx,
- samr_LookupNames 
for [%s] returns %d RIDs\n,
+ samr_LookupNames 
for [%s] returns %d RIDs,
  
r-in.account_name, ln.out.rids.count);
talloc_free(tmp_ctx);
return NT_STATUS_INVALID_PARAMETER;
@@ -647,7 +647,7 @@
status = dcerpc_samr_CreateUser2(samr_pipe, tmp_ctx, 
cu);  
if (!NT_STATUS_IS_OK(status)) {
r-out.error_string = talloc_asprintf(mem_ctx,
- 
samr_CreateUser2 (recreate) for [%s] failed: %s\n,
+ 
samr_CreateUser2 (recreate) for [%s] failed: %s,
  
r-in.account_name, nt_errstr(status));
talloc_free(tmp_ctx);
return status;
@@ -655,7 +655,7 @@
}
} else if (!NT_STATUS_IS_OK(status)) {
r-out.error_string = talloc_asprintf(mem_ctx,
- samr_CreateUser2 for 
[%s] failed: %s\n,
+ samr_CreateUser2 for 
[%s] failed: %s,
  r-in.account_name, 
nt_errstr(status));
talloc_free(tmp_ctx);
return status;
@@ -679,7 +679,7 @@
status = NT_STATUS_INVALID_PARAMETER;

svn commit: samba r18610 - in branches/SAMBA_4_0/source/libnet: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 09:58:53 + (Mon, 18 Sep 2006)
New Revision: 18610

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18610

Log:
Fix typo.

Guenther

Modified:
   branches/SAMBA_4_0/source/libnet/libnet_time.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_time.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_time.c  2006-09-18 09:54:44 UTC 
(rev 18609)
+++ branches/SAMBA_4_0/source/libnet/libnet_time.c  2006-09-18 09:58:53 UTC 
(rev 18610)
@@ -54,7 +54,7 @@
status = dcerpc_srvsvc_NetRemoteTOD(c.out.dcerpc_pipe, mem_ctx, tod);
if (!NT_STATUS_IS_OK(status)) {
r-srvsvc.out.error_string = talloc_asprintf(mem_ctx,
-   srvsvc_NetrRemoteTOD on server 
'%s' failed: %n,
+   srvsvc_NetrRemoteTOD on server 
'%s' failed: %s,
r-srvsvc.in.server_name, 
nt_errstr(status));
goto disconnect;
}



svn commit: samba r18611 - in branches/SAMBA_4_0/source/libnet: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 10:00:19 + (Mon, 18 Sep 2006)
New Revision: 18611

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18611

Log:
Do not return NT_STATUS_OK when libnet_Add|DelShare has failed.

Guenther

Modified:
   branches/SAMBA_4_0/source/libnet/libnet_share.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_share.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_share.c 2006-09-18 09:58:53 UTC 
(rev 18610)
+++ branches/SAMBA_4_0/source/libnet/libnet_share.c 2006-09-18 10:00:19 UTC 
(rev 18611)
@@ -134,13 +134,19 @@
s.in.info.info2 = r-in.share;
s.in.server_unc = talloc_asprintf(mem_ctx, %s, 
r-in.server_name);
  
-   status = dcerpc_srvsvc_NetShareAdd(c.out.dcerpc_pipe, mem_ctx,s);  
+   status = dcerpc_srvsvc_NetShareAdd(c.out.dcerpc_pipe, mem_ctx, s); 
 
if (!NT_STATUS_IS_OK(status)) {
r-out.error_string = talloc_asprintf(mem_ctx,
  srvsvc_NetShareAdd on 
server '%s' failed
  : %s,
  r-in.server_name, 
nt_errstr(status));
+   } else if (!W_ERROR_IS_OK(s.out.result)) {
+   r-out.error_string = talloc_asprintf(mem_ctx,
+ srvsvc_NetShareAdd on 
server '%s' failed
+ : %s,
+ r-in.server_name, 
win_errstr(s.out.result));
+   status = werror_to_ntstatus(s.out.result);
}
 
talloc_free(c.out.dcerpc_pipe);
@@ -178,6 +184,12 @@
  srvsvc_NetShareDel on 
server '%s' failed
  : %s,
  r-in.server_name, 
nt_errstr(status));
+   } else if (!W_ERROR_IS_OK(s.out.result)) {
+   r-out.error_string = talloc_asprintf(mem_ctx,
+ srvsvc_NetShareDel on 
server '%s' failed
+ : %s,
+ r-in.server_name, 
win_errstr(s.out.result));
+   status = werror_to_ntstatus(s.out.result);
}
 
talloc_free(c.out.dcerpc_pipe);



svn commit: samba r18612 - in branches/SAMBA_3_0/source/script/tests: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 10:15:58 + (Mon, 18 Sep 2006)
New Revision: 18612

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18612

Log:
remove RPC-ECHO till it gets fixed

metze

Modified:
   branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh


Changeset:
Modified: branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh
===
--- branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh 2006-09-18 
10:00:19 UTC (rev 18611)
+++ branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh 2006-09-18 
10:15:58 UTC (rev 18612)
@@ -33,7 +33,7 @@
 raw=$raw RAW-SFILEINFO RAW-SFILEINFO-BUG RAW-STREAMS RAW-UNLINK RAW-WRITE
 raw=$raw RAW-SAMBA3HIDE RAW-SAMBA3BADPATH
 
-rpc=RPC-ECHO RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-NETLOGSAMBA3
+rpc=RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-NETLOGSAMBA3
 rpc=$rpc RPC-SAMBA3SESSIONKEY RPC-SAMBA3-SRVSVC RPC-SAMBA3-GETUSERNAME
 rpc=$rpc RPC-SAMBA3-SHARESEC RPC-UNIXINFO
 



svn commit: samba r18613 - in branches/SAMBA_3_0/source/libsmb: .

2006-09-18 Thread jra
Author: jra
Date: 2006-09-18 15:20:33 + (Mon, 18 Sep 2006)
New Revision: 18613

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18613

Log:
Metze, in your DLINKLIST commit you changed this
from 10 seconds to 30 seconds. I don't think you
meant to do this
Jeremy.

Modified:
   branches/SAMBA_3_0/source/libsmb/cliconnect.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/cliconnect.c
===
--- branches/SAMBA_3_0/source/libsmb/cliconnect.c   2006-09-18 10:15:58 UTC 
(rev 18612)
+++ branches/SAMBA_3_0/source/libsmb/cliconnect.c   2006-09-18 15:20:33 UTC 
(rev 18613)
@@ -1423,7 +1423,7 @@
return NT_STATUS_UNSUCCESSFUL;
}
 
-   cli_set_timeout(cli, 3); /* 10 seconds. */
+   cli_set_timeout(cli, 1); /* 10 seconds. */
 
if (dest_ip)
ip = *dest_ip;



Re: svn commit: samba r18607 - in branches/SAMBA_4_0/source/libnet: .

2006-09-18 Thread Rafal Szczesniak
On Mon, Sep 18, 2006 at 09:02:50AM +, [EMAIL PROTECTED] wrote:
 Author: metze
 Date: 2006-09-18 09:02:50 + (Mon, 18 Sep 2006)
 New Revision: 18607
 
 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18607
 
 Log:
 remove unused structure element
 
 rafal: is there a reason why we don't use libnet_AddShare() in the torture 
 test?

Yes, the original code is not mine, but the volunteer (sorry, forgot his
name) on the net. He probably did not write the test for it. I'm going
to check the share manipulation code and probably reconstruct it a little
once I'm done with user account functions.


cheers,
-- 
Rafal Szczesniak
Samba Team member  http://www.samba.org



signature.asc
Description: Digital signature


svn commit: samba r18614 - in branches/SAMBA_4_0/source/lib/util: .

2006-09-18 Thread mimir
Author: mimir
Date: 2006-09-18 17:32:13 + (Mon, 18 Sep 2006)
New Revision: 18614

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18614

Log:
a bit of work done while on the plane.

a new function converting NTTIME to struct timeval


rafal


Modified:
   branches/SAMBA_4_0/source/lib/util/time.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/util/time.c
===
--- branches/SAMBA_4_0/source/lib/util/time.c   2006-09-18 15:20:33 UTC (rev 
18613)
+++ branches/SAMBA_4_0/source/lib/util/time.c   2006-09-18 17:32:13 UTC (rev 
18614)
@@ -566,6 +566,28 @@
  ((TIME_FIXUP_CONSTANT + (uint64_t)tv-tv_sec) * 100));
 }
 
+/**
+  convert a NTTIME to a timeval
+*/
+_PUBLIC_ void nttime_to_timeval(struct timeval *tv, NTTIME t)
+{
+   if (tv == NULL) return;
+
+   t += 10/2;
+   t /= 10;
+   t -= TIME_FIXUP_CONSTANT*1000*1000;
+
+   tv-tv_sec  = t / 100;
+
+   if (TIME_T_MIN  tv-tv_sec || tv-tv_sec  TIME_T_MAX) {
+   tv-tv_sec  = 0;
+   tv-tv_usec = 0;
+   return;
+   }
+   
+   tv-tv_usec = t - tv-tv_sec*100;
+}
+
 /***
 yield the difference between *A and *B, in seconds, ignoring leap seconds
 /



svn commit: samba r18615 - in branches/SAMBA_4_0/source/libnet: .

2006-09-18 Thread mimir
Author: mimir
Date: 2006-09-18 17:33:23 + (Mon, 18 Sep 2006)
New Revision: 18615

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18615

Log:
add more time fields and fix a silly mistake.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/libnet_user.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_user.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_user.c  2006-09-18 17:32:13 UTC 
(rev 18614)
+++ branches/SAMBA_4_0/source/libnet/libnet_user.c  2006-09-18 17:33:23 UTC 
(rev 18615)
@@ -550,7 +550,7 @@
SET_FIELD_LSA_STRING(r-in, user, mod, full_name, 
USERMOD_FIELD_FULL_NAME);
 
/* description change */
-   SET_FIELD_LSA_STRING(r-in, user, mod, comment, 
USERMOD_FIELD_DESCRIPTION);
+   SET_FIELD_LSA_STRING(r-in, user, mod, description, 
USERMOD_FIELD_DESCRIPTION);
 
/* comment change */
SET_FIELD_LSA_STRING(r-in, user, mod, comment, USERMOD_FIELD_COMMENT);
@@ -573,6 +573,12 @@
/* force password change time */
SET_FIELD_NTTIME(r-in, user, mod, force_password_change, 
USERMOD_FIELD_FORCE_PASS_CHG);
 
+   /* last logon change time */
+   SET_FIELD_NTTIME(r-in, user, mod, last_logon, 
USERMOD_FIELD_LAST_LOGON);
+
+   /* last logoff change time */
+   SET_FIELD_NTTIME(r-in, user, mod, last_logoff, 
USERMOD_FIELD_LAST_LOGOFF);
+
/* account expiry change */
SET_FIELD_NTTIME(r-in, user, mod, acct_expiry, 
USERMOD_FIELD_ACCT_EXPIRY);
 
@@ -744,6 +750,7 @@
s = talloc_get_type(c-private_data, struct user_info_state);
info = s-userinfo.out.info.info21;
 
+   /* string fields */
r-out.account_name   = talloc_steal(mem_ctx, 
info-account_name.string);
r-out.full_name  = talloc_steal(mem_ctx, 
info-full_name.string);
r-out.description= talloc_steal(mem_ctx, 
info-description.string);
@@ -753,6 +760,25 @@
r-out.logon_script   = talloc_steal(mem_ctx, 
info-logon_script.string);
r-out.profile_path   = talloc_steal(mem_ctx, 
info-profile_path.string);
 
+   /* time fields (allocation) */
+   r-out.acct_expiry   = talloc(mem_ctx, struct timeval);
+   r-out.allow_password_change = talloc(mem_ctx, struct timeval);
+   r-out.force_password_change = talloc(mem_ctx, struct timeval);
+   r-out.last_logon= talloc(mem_ctx, struct timeval);
+   r-out.last_logoff   = talloc(mem_ctx, struct timeval);
+   r-out.last_password_change  = talloc(mem_ctx, struct timeval);
+   
+   /* time fields (converting) */
+   nttime_to_timeval(r-out.acct_expiry, info-acct_expiry);
+   nttime_to_timeval(r-out.allow_password_change, 
info-allow_password_change);
+   nttime_to_timeval(r-out.force_password_change, 
info-force_password_change);
+   nttime_to_timeval(r-out.last_logon, info-last_logon);
+   nttime_to_timeval(r-out.last_logoff, info-last_logoff);
+   nttime_to_timeval(r-out.last_password_change, 
info-last_password_change);
+
+   /* flag and number fields */
+   r-out.acct_flags = info-acct_flags;
+
r-out.error_string = talloc_strdup(mem_ctx, Success);
}
 



svn commit: samba r18616 - in branches/SAMBA_3_0/source/auth: .

2006-09-18 Thread jerry
Author: jerry
Date: 2006-09-18 18:28:56 + (Mon, 18 Sep 2006)
New Revision: 18616

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18616

Log:
fix breakage after DLIST_ADD_END() changes for --with-pam
Modified:
   branches/SAMBA_3_0/source/auth/pampass.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/pampass.c
===
--- branches/SAMBA_3_0/source/auth/pampass.c2006-09-18 17:33:23 UTC (rev 
18615)
+++ branches/SAMBA_3_0/source/auth/pampass.c2006-09-18 18:28:56 UTC (rev 
18616)
@@ -208,7 +208,6 @@
fstring reply;
struct chat_struct *list = NULL;
struct chat_struct *t;
-   struct chat_struct *tmp;
 
while (1) {
t = SMB_MALLOC_P(struct chat_struct);
@@ -219,7 +218,7 @@
 
ZERO_STRUCTP(t);
 
-   DLIST_ADD_END(list, t, tmp);
+   DLIST_ADD_END(list, t, struct chat_struct*);
 
if (!next_token(p, prompt, NULL, sizeof(fstring)))
break;



svn commit: samba r18617 - in branches/SAMBA_3_0/source/rpcclient: .

2006-09-18 Thread jerry
Author: jerry
Date: 2006-09-18 18:30:20 + (Mon, 18 Sep 2006)
New Revision: 18617

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18617

Log:
fix unixinfo call after change to IDL (change from pointer)
Modified:
   branches/SAMBA_3_0/source/rpcclient/cmd_unixinfo.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpcclient/cmd_unixinfo.c
===
--- branches/SAMBA_3_0/source/rpcclient/cmd_unixinfo.c  2006-09-18 18:28:56 UTC 
(rev 18616)
+++ branches/SAMBA_3_0/source/rpcclient/cmd_unixinfo.c  2006-09-18 18:30:20 UTC 
(rev 18617)
@@ -156,7 +156,7 @@
uids[i] = atoi(argv[i+1]);
}
 
-   result = rpccli_unixinfo_GetPWUid(cli, mem_ctx, num_uids, uids, info);
+   result = rpccli_unixinfo_GetPWUid(cli, mem_ctx, num_uids, uids, info);
 
if (!NT_STATUS_IS_OK(result)) {
return result;



svn commit: samba r18618 - in branches/SAMBA_3_0/source: . librpc librpc/gen_ndr librpc/idl script

2006-09-18 Thread jerry
Author: jerry
Date: 2006-09-18 19:02:06 + (Mon, 18 Sep 2006)
New Revision: 18618

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18618

Log:
* remove svn:externals 
* 'make idl' now requires pidl in the current PATH
* regenerate winreg ndr files



Added:
   branches/SAMBA_3_0/source/librpc/idl/
   branches/SAMBA_3_0/source/librpc/idl/dfs.idl
   branches/SAMBA_3_0/source/librpc/idl/echo.idl
   branches/SAMBA_3_0/source/librpc/idl/eventlog.idl
   branches/SAMBA_3_0/source/librpc/idl/idl_types.h
   branches/SAMBA_3_0/source/librpc/idl/initshutdown.idl
   branches/SAMBA_3_0/source/librpc/idl/lsa.idl
   branches/SAMBA_3_0/source/librpc/idl/misc.idl
   branches/SAMBA_3_0/source/librpc/idl/netlogon.idl
   branches/SAMBA_3_0/source/librpc/idl/ntsvcs.idl
   branches/SAMBA_3_0/source/librpc/idl/samr.idl
   branches/SAMBA_3_0/source/librpc/idl/security.idl
   branches/SAMBA_3_0/source/librpc/idl/spoolss.idl
   branches/SAMBA_3_0/source/librpc/idl/srvsvc.idl
   branches/SAMBA_3_0/source/librpc/idl/svcctl.idl
   branches/SAMBA_3_0/source/librpc/idl/unixinfo.idl
   branches/SAMBA_3_0/source/librpc/idl/winreg.idl
   branches/SAMBA_3_0/source/librpc/idl/wkssvc.idl
Modified:
   branches/SAMBA_3_0/source/
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/librpc/
   branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_winreg.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/winreg.h
   branches/SAMBA_3_0/source/script/build_idl.sh


Changeset:
Sorry, the patch is too large (9301 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18618


svn commit: samba r18619 - in branches/SAMBA_3_0/source: include rpc_client rpcclient

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 19:18:29 + (Mon, 18 Sep 2006)
New Revision: 18619

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18619

Log:
Add rpcclient helper for samr_querydispinfo2|3 for testing.

Guenther

Modified:
   branches/SAMBA_3_0/source/include/rpc_samr.h
   branches/SAMBA_3_0/source/rpc_client/cli_samr.c
   branches/SAMBA_3_0/source/rpcclient/cmd_samr.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/rpc_samr.h
===
--- branches/SAMBA_3_0/source/include/rpc_samr.h2006-09-18 19:02:06 UTC 
(rev 18618)
+++ branches/SAMBA_3_0/source/include/rpc_samr.h2006-09-18 19:18:29 UTC 
(rev 18619)
@@ -128,11 +128,11 @@
 #define SAMR_REMOVE_SID_FOREIGN_DOMAIN0x2d
 #define SAMR_QUERY_DOMAIN_INFO2  0x2e /* looks like an alias for 
SAMR_QUERY_DOMAIN_INFO */
 #define SAMR_UNKNOWN_2f0x2f
-#define SAMR_QUERY_DISPINFO3   0x30 /* Alias for SAMR_QUERY_DISPINFO
+#define SAMR_QUERY_DISPINFO2   0x30 /* Alias for SAMR_QUERY_DISPINFO
   with info level 3 */
 #define SAMR_UNKNOWN_310x31
 #define SAMR_CREATE_USER   0x32
-#define SAMR_QUERY_DISPINFO4   0x33 /* Alias for SAMR_QUERY_DISPINFO
+#define SAMR_QUERY_DISPINFO3   0x33 /* Alias for SAMR_QUERY_DISPINFO
   with info level 4 */
 #define SAMR_ADDMULTI_ALIASMEM 0x34
 

Modified: branches/SAMBA_3_0/source/rpc_client/cli_samr.c
===
--- branches/SAMBA_3_0/source/rpc_client/cli_samr.c 2006-09-18 19:02:06 UTC 
(rev 18618)
+++ branches/SAMBA_3_0/source/rpc_client/cli_samr.c 2006-09-18 19:18:29 UTC 
(rev 18619)
@@ -1473,6 +1473,110 @@
return result;
 }
 
+
+/* Query display info2 */
+
+NTSTATUS rpccli_samr_query_dispinfo2(struct rpc_pipe_client *cli,
+TALLOC_CTX *mem_ctx, 
+POLICY_HND *domain_pol, uint32 *start_idx,
+uint16 switch_value, uint32 *num_entries,
+uint32 max_entries, uint32 max_size,
+SAM_DISPINFO_CTR *ctr)
+{
+   prs_struct qbuf, rbuf;
+   SAMR_Q_QUERY_DISPINFO q;
+   SAMR_R_QUERY_DISPINFO r;
+   NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+   DEBUG(10,(cli_samr_query_dispinfo2 for start_idx = %u\n, *start_idx));
+
+   ZERO_STRUCT(q);
+   ZERO_STRUCT(r);
+
+   *num_entries = 0;
+
+   /* Marshall data and send request */
+
+   init_samr_q_query_dispinfo(q, domain_pol, switch_value,
+  *start_idx, max_entries, max_size);
+
+   r.ctr = ctr;
+
+   CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_DISPINFO2,
+   q, r,
+   qbuf, rbuf,
+   samr_io_q_query_dispinfo,
+   samr_io_r_query_dispinfo,
+   NT_STATUS_UNSUCCESSFUL); 
+
+   /* Return output parameters */
+
+result = r.status;
+
+   if (!NT_STATUS_IS_OK(result) 
+   NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) {
+   goto done;
+   }
+
+   *num_entries = r.num_entries;
+   *start_idx += r.num_entries;  /* No next_idx in this structure! */
+
+ done:
+   return result;
+}
+
+/* Query display info */
+
+NTSTATUS rpccli_samr_query_dispinfo3(struct rpc_pipe_client *cli,
+TALLOC_CTX *mem_ctx, 
+POLICY_HND *domain_pol, uint32 *start_idx,
+uint16 switch_value, uint32 *num_entries,
+uint32 max_entries, uint32 max_size,
+SAM_DISPINFO_CTR *ctr)
+{
+   prs_struct qbuf, rbuf;
+   SAMR_Q_QUERY_DISPINFO q;
+   SAMR_R_QUERY_DISPINFO r;
+   NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+   DEBUG(10,(cli_samr_query_dispinfo3 for start_idx = %u\n, *start_idx));
+
+   ZERO_STRUCT(q);
+   ZERO_STRUCT(r);
+
+   *num_entries = 0;
+
+   /* Marshall data and send request */
+
+   init_samr_q_query_dispinfo(q, domain_pol, switch_value,
+  *start_idx, max_entries, max_size);
+
+   r.ctr = ctr;
+
+   CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_DISPINFO3,
+   q, r,
+   qbuf, rbuf,
+   samr_io_q_query_dispinfo,
+   samr_io_r_query_dispinfo,
+   NT_STATUS_UNSUCCESSFUL); 
+
+   /* Return output parameters */
+
+result = r.status;
+
+   if (!NT_STATUS_IS_OK(result) 
+   NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) {
+   goto done;
+   }
+
+   *num_entries = r.num_entries;
+   *start_idx += r.num_entries;  /* No next_idx in this structure! */
+
+ done:
+   return result;
+}
+
+
 /* Lookup rids.  Note that NT4 

svn commit: samba r18620 - in branches: SAMBA_3_0/source/libads SAMBA_3_0_23/source/libads

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 19:26:09 + (Mon, 18 Sep 2006)
New Revision: 18620

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18620

Log:
Fallback to non-paging LDAP searches in ads_do_search_retry_internal()
for anonymous bound connections.

When doing anonymous bind you can never use paged LDAP control for
RootDSE searches on AD. 

Guenther

Modified:
   branches/SAMBA_3_0/source/libads/ldap_utils.c
   branches/SAMBA_3_0_23/source/libads/ldap_utils.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/ldap_utils.c
===
--- branches/SAMBA_3_0/source/libads/ldap_utils.c   2006-09-18 19:18:29 UTC 
(rev 18619)
+++ branches/SAMBA_3_0/source/libads/ldap_utils.c   2006-09-18 19:26:09 UTC 
(rev 18620)
@@ -50,7 +50,15 @@
}
 
*res = NULL;
-   status = ads_do_search_all_args(ads, bp, scope, expr, attrs, args, res);
+
+   /* when binding anonymously, we cannot use the paged search LDAP
+* control - Guenther */
+
+   if (ads-auth.flags  ADS_AUTH_ANON_BIND) {
+   status = ads_do_search(ads, bp, scope, expr, attrs, res);
+   } else {
+   status = ads_do_search_all_args(ads, bp, scope, expr, attrs, 
args, res);
+   }
if (ADS_ERR_OK(status)) {
DEBUG(5,(Search for %s gave %d replies\n,
 expr, ads_count_replies(ads, *res)));
@@ -83,7 +91,16 @@
}
 
*res = NULL;
-   status = ads_do_search_all_args(ads, bp, scope, expr, attrs, 
args, res);
+
+   /* when binding anonymously, we cannot use the paged search LDAP
+* control - Guenther */
+
+   if (ads-auth.flags  ADS_AUTH_ANON_BIND) {
+   status = ads_do_search(ads, bp, scope, expr, attrs, 
res);
+   } else {
+   status = ads_do_search_all_args(ads, bp, scope, expr, 
attrs, args, res);
+   }
+
if (ADS_ERR_OK(status)) {
DEBUG(5,(Search for filter: %s, base: %s gave %d 
replies\n,
 expr, bp, ads_count_replies(ads, *res)));

Modified: branches/SAMBA_3_0_23/source/libads/ldap_utils.c
===
--- branches/SAMBA_3_0_23/source/libads/ldap_utils.c2006-09-18 19:18:29 UTC 
(rev 18619)
+++ branches/SAMBA_3_0_23/source/libads/ldap_utils.c2006-09-18 19:26:09 UTC 
(rev 18620)
@@ -49,7 +49,15 @@
}
 
*res = NULL;
-   status = ads_do_search_all_args(ads, bp, scope, expr, attrs, args, res);
+
+   /* when binding anonymously, we cannot use the paged search LDAP
+* control - Guenther */
+
+   if (ads-auth.flags  ADS_AUTH_ANON_BIND) {
+   status = ads_do_search(ads, bp, scope, expr, attrs, res);
+   } else {
+   status = ads_do_search_all_args(ads, bp, scope, expr, attrs, 
args, res);
+   }
if (ADS_ERR_OK(status)) {
DEBUG(5,(Search for %s gave %d replies\n,
 expr, ads_count_replies(ads, *res)));
@@ -82,7 +90,16 @@
}
 
*res = NULL;
-   status = ads_do_search_all_args(ads, bp, scope, expr, attrs, 
args, res);
+
+   /* when binding anonymously, we cannot use the paged search LDAP
+* control - Guenther */
+
+   if (ads-auth.flags  ADS_AUTH_ANON_BIND) {
+   status = ads_do_search(ads, bp, scope, expr, attrs, 
res);
+   } else {
+   status = ads_do_search_all_args(ads, bp, scope, expr, 
attrs, args, res);
+   }
+
if (ADS_ERR_OK(status)) {
DEBUG(5,(Search for filter: %s, base: %s gave %d 
replies\n,
 expr, bp, ads_count_replies(ads, *res)));



svn commit: samba r18621 - in branches/SAMBA_3_0/source/rpc_server: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 19:27:15 + (Mon, 18 Sep 2006)
New Revision: 18621

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18621

Log:
Fix samr server build.

Guenther

Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_samr.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_samr.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_samr.c 2006-09-18 19:26:09 UTC 
(rev 18620)
+++ branches/SAMBA_3_0/source/rpc_server/srv_samr.c 2006-09-18 19:27:15 UTC 
(rev 18621)
@@ -1531,8 +1531,8 @@
   {SAMR_QUERY_DOMAIN_INFO , SAMR_QUERY_DOMAIN_INFO, 
api_samr_query_domain_info},
   {SAMR_QUERY_USERGROUPS  , SAMR_QUERY_USERGROUPS , 
api_samr_query_usergroups },
   {SAMR_QUERY_DISPINFO, SAMR_QUERY_DISPINFO   , 
api_samr_query_dispinfo   },
+  {SAMR_QUERY_DISPINFO2   , SAMR_QUERY_DISPINFO2  , 
api_samr_query_dispinfo   },
   {SAMR_QUERY_DISPINFO3   , SAMR_QUERY_DISPINFO3  , 
api_samr_query_dispinfo   },
-  {SAMR_QUERY_DISPINFO4   , SAMR_QUERY_DISPINFO4  , 
api_samr_query_dispinfo   },
   
   {SAMR_QUERY_ALIASINFO   , SAMR_QUERY_ALIASINFO  , 
api_samr_query_aliasinfo  },
   {SAMR_QUERY_GROUPINFO   , SAMR_QUERY_GROUPINFO  , 
api_samr_query_groupinfo  },



svn commit: samba r18622 - in branches/SAMBA_3_0/source/python: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 19:43:08 + (Mon, 18 Sep 2006)
New Revision: 18622

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18622

Log:
Fix at least the python bindings *build*, I'm sure there is much more to
do so that they actually work again.

Guenther

Modified:
   branches/SAMBA_3_0/source/python/py_smb.c


Changeset:
Modified: branches/SAMBA_3_0/source/python/py_smb.c
===
--- branches/SAMBA_3_0/source/python/py_smb.c   2006-09-18 19:27:15 UTC (rev 
18621)
+++ branches/SAMBA_3_0/source/python/py_smb.c   2006-09-18 19:43:08 UTC (rev 
18622)
@@ -99,7 +99,7 @@
static char *kwlist[] = { creds, NULL };
PyObject *creds;
char *username, *domain, *password, *errstr;
-   BOOL result;
+   NTSTATUS result;
 
if (!PyArg_ParseTupleAndKeywords(args, kw, |O, kwlist, creds))
return NULL;
@@ -118,7 +118,7 @@
return NULL;
}
 
-   return Py_BuildValue(i, result);
+   return Py_BuildValue(i, NT_STATUS_IS_OK(result));
 }
 
 static PyObject *py_smb_tconx(PyObject *self, PyObject *args, PyObject *kw)



svn commit: samba r18623 - in branches/SAMBA_3_0/source: . include librpc/gen_ndr librpc/idl

2006-09-18 Thread jerry
Author: jerry
Date: 2006-09-18 19:46:11 + (Mon, 18 Sep 2006)
New Revision: 18623

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18623

Log:
starting on eventlog IDL
Added:
   branches/SAMBA_3_0/source/librpc/gen_ndr/cli_eventlog.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/cli_eventlog.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/eventlog.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_eventlog.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_eventlog.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_eventlog.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_eventlog.h
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/include/rpc_eventlog.h
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/librpc/idl/eventlog.idl


Changeset:
Sorry, the patch is too large (3933 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18623


svn commit: samba r18624 - in branches/SAMBA_4_0/source/librpc/idl: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 19:51:27 + (Mon, 18 Sep 2006)
New Revision: 18624

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18624

Log:
path is a ref pointer in dfs_GetInfo().

torture test to follow.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/dfs.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 19:46:11 UTC 
(rev 18623)
+++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 19:51:27 UTC 
(rev 18624)
@@ -112,7 +112,7 @@
} dfs_Info;
 
WERROR dfs_GetInfo (
-   [in,string,charset(UTF16)] uint16 *path,
+   [in,ref,string,charset(UTF16)] uint16 *path,
[in,unique,string,charset(UTF16)] uint16 *server,
[in,unique,string,charset(UTF16)] uint16 *share,
[in] uint32 level,



svn commit: samba r18625 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 20:00:51 + (Mon, 18 Sep 2006)
New Revision: 18625

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18625

Log:
dfs_GetManagerVersion() returns a version number, not just an exist
flag.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/dfs.idl
   branches/SAMBA_4_0/source/torture/rpc/dfs.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 19:51:27 UTC 
(rev 18624)
+++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 20:00:51 UTC 
(rev 18625)
@@ -11,8 +11,14 @@
 {
/**/
/* Function: 0x00 */
+   typedef [v1_enum] enum {
+   DFS_MANAGER_VERSION_NT4 = 0,
+   DFS_MANAGER_VERSION_W2K = 2,
+   DFS_MANAGER_VERSION_W2K3= 4
+   } dfs_ManagerVersion;
+
void dfs_GetManagerVersion(
-   [out] uint32 *exist_flag
+   [out]   dfs_ManagerVersion *version
);
 
 

Modified: branches/SAMBA_4_0/source/torture/rpc/dfs.c
===
--- branches/SAMBA_4_0/source/torture/rpc/dfs.c 2006-09-18 19:51:27 UTC (rev 
18624)
+++ branches/SAMBA_4_0/source/torture/rpc/dfs.c 2006-09-18 20:00:51 UTC (rev 
18625)
@@ -1,6 +1,6 @@
 /* 
Unix SMB/CIFS implementation.
-   test suite for lsa dfs operations
+   test suite for rpc dfs operations
 
Copyright (C) Andrew Tridgell 2003

@@ -24,14 +24,12 @@
 #include torture/rpc/rpc.h
 #include librpc/gen_ndr/ndr_dfs_c.h
 
-
-static BOOL test_GetManagerVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
+static BOOL test_GetManagerVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
enum dfs_ManagerVersion *version)
 {
NTSTATUS status;
struct dfs_GetManagerVersion r;
-   uint32_t exist = 0;
 
-   r.out.exist_flag = exist;
+   r.out.version = version;
 
status = dcerpc_dfs_GetManagerVersion(p, mem_ctx, r);
if (!NT_STATUS_IS_OK(status)) {
@@ -172,6 +170,7 @@
 struct dcerpc_pipe *p;
TALLOC_CTX *mem_ctx;
BOOL ret = True;
+   enum dfs_ManagerVersion version;
 
mem_ctx = talloc_init(torture_rpc_dfs);
 
@@ -182,7 +181,7 @@
return False;
}
 
-   if (!test_GetManagerVersion(p, mem_ctx)) {
+   if (!test_GetManagerVersion(p, mem_ctx, version)) {
ret = False;
}
 



svn commit: samba r18626 - in branches/SAMBA_4_0/source/torture/libnet: .

2006-09-18 Thread mimir
Author: mimir
Date: 2006-09-18 20:08:28 + (Mon, 18 Sep 2006)
New Revision: 18626

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18626

Log:
fix cleanup function to safely recover after interrupted test
and add one requested field in to the function creating testing
set of changes for user modify routine.


rafal


Modified:
   branches/SAMBA_4_0/source/torture/libnet/libnet_user.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_user.c
===
--- branches/SAMBA_4_0/source/torture/libnet/libnet_user.c  2006-09-18 
20:00:51 UTC (rev 18625)
+++ branches/SAMBA_4_0/source/torture/libnet/libnet_user.c  2006-09-18 
20:08:28 UTC (rev 18626)
@@ -37,7 +37,6 @@
struct samr_LookupNames r1;
struct samr_OpenUser r2;
struct samr_DeleteUser r3;
-   struct samr_Close r4;
struct lsa_String names[2];
uint32_t rid;
struct policy_handle user_handle;
@@ -82,15 +81,6 @@
return False;
}
 
-   r4.in.handle = domain_handle;
-   r4.out.handle = domain_handle;
-
-   status = dcerpc_samr_Close(p, mem_ctx, r4);
-   if (!NT_STATUS_IS_OK(status)) {
-   printf(Close failed - %s\n, nt_errstr(status));
-   return False;
-   }
-   
return True;
 }
 
@@ -146,6 +136,25 @@
 }
 
 
+static BOOL test_close(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+  struct policy_handle *domain_handle)
+{
+   NTSTATUS status;
+   struct samr_Close r;
+  
+   r.in.handle = domain_handle;
+   r.out.handle = domain_handle;
+
+   status = dcerpc_samr_Close(p, mem_ctx, r);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(Close failed - %s\n, nt_errstr(status));
+   return False;
+   }
+   
+   return True;
+}
+
+
 static BOOL test_createuser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct policy_handle *handle, const char* user)
 {
@@ -210,6 +219,7 @@
TALLOC_CTX *mem_ctx;
struct libnet_context *ctx;
struct libnet_CreateUser req;
+   BOOL ret = True;
 
mem_ctx = talloc_init(test_createuser);
binding = lp_parm_string(-1, torture, binding);
@@ -224,15 +234,25 @@
status = libnet_CreateUser(ctx, mem_ctx, req);
if (!NT_STATUS_IS_OK(status)) {
printf(libnet_CreateUser call failed: %s\n, 
nt_errstr(status));
-   return False;
+   ret = False;
+   goto done;
}
 
if (!test_cleanup(ctx-samr.pipe, mem_ctx, ctx-samr.handle, 
TEST_USERNAME)) {
printf(cleanup failed\n);
-   return False;
+   ret = False;
+   goto done;
}
 
-   return True;
+   if (!test_close(ctx-samr.pipe, mem_ctx, ctx-samr.handle)) {
+   printf(domain close failed\n);
+   ret = False;
+   }
+
+done:
+   talloc_free(ctx);
+   talloc_free(mem_ctx);
+   return ret;
 }
 
 
@@ -262,7 +282,8 @@
p,
dcerpc_table_samr);
if (!NT_STATUS_IS_OK(status)) {
-   return False;
+   ret = False;
+   goto done;
}
 
domain_name.string = lp_workgroup();
@@ -287,6 +308,7 @@
talloc_free(mem_ctx);
 
 done:
+   talloc_free(ctx);
talloc_free(prep_mem_ctx);
return ret;
 }
@@ -308,18 +330,20 @@
continue; \
}
 
-static void set_test_changes(TALLOC_CTX *mem_ctx, struct libnet_ModifyUser *r, 
int num_changes)
+enum test_fields { none = 0, account_name, full_name, description, 
home_directory, home_drive,
+  comment, logon_script, profile_path, acct_expiry, 
allow_password_change,
+  force_password_change, last_logon, last_logoff, 
last_password_change };
+
+static void set_test_changes(TALLOC_CTX *mem_ctx, struct libnet_ModifyUser *r, 
int num_changes,
+char **user_name, enum test_fields req_change)
 {
-   enum fields { account_name = 0, full_name, description, home_directory, 
home_drive,
- comment, logon_script, profile_path, acct_expiry, 
allow_password_change,
- force_password_change, last_logon, last_logoff, 
last_password_change };
const int num_fields = 14;
const char* logon_scripts[] = { start_login.cmd, login.bat, 
start.cmd };
const char* home_dirs[] = { srv\\home, homesrv\\home\\user, 
pdcsrv\\domain };
const char* home_drives[] = { H:, z:, I:, J:, n: };
const char *homedir, *homedrive, *logonscript;
struct timeval now;
-   int i, randval;
+   int i, testfld;
 
srandom((unsigned)time(NULL));
 
@@ -327,17 +351,21 @@
 
for (i = 0; i  num_changes  i  num_fields; i++) {

svn commit: samba r18627 - in branches/SAMBA_4_0/source/librpc/idl: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 20:18:50 + (Mon, 18 Sep 2006)
New Revision: 18627

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18627

Log:
only cosmetic reformat, no functional changes.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/dfs.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 20:08:28 UTC 
(rev 18626)
+++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 20:18:50 UTC 
(rev 18627)
@@ -25,19 +25,19 @@
/**/
/* Function: 0x01 */
WERROR dfs_Add (
-   [in,string,charset(UTF16)] uint16 *path,
-   [in,string,charset(UTF16)] uint16 *server,
-   [in,unique,string,charset(UTF16)] uint16 *share,
-   [in,unique,string,charset(UTF16)] uint16 *comment,
-   [in] uint32 flags
+   [in][string,charset(UTF16)] uint16 *path,
+   [in][string,charset(UTF16)] uint16 *server,
+   [in,unique] [string,charset(UTF16)] uint16 *share,
+   [in,unique] [string,charset(UTF16)] uint16 *comment,
+   [in]uint32 flags
);
 
/**/
/* Function: 0x02 */
WERROR dfs_Remove (
-   [in,string,charset(UTF16)] uint16 *path,
-   [in,unique,string,charset(UTF16)] uint16 *server,
-   [in,unique,string,charset(UTF16)] uint16 *share
+   [in][string,charset(UTF16)] uint16 *path,
+   [in,unique] [string,charset(UTF16)] uint16 *server,
+   [in,unique] [string,charset(UTF16)] uint16 *share
);
 
/**/
@@ -107,7 +107,7 @@
} dfs_Info300;
 
typedef union {
-   [case(0)]   dfs_Info0 *info0;
+   [case(0)]   dfs_Info0 *info0;
[case(1)]   dfs_Info1 *info1;
[case(2)]   dfs_Info2 *info2;
[case(3)]   dfs_Info3 *info3;
@@ -118,10 +118,10 @@
} dfs_Info;
 
WERROR dfs_GetInfo (
-   [in,ref,string,charset(UTF16)] uint16 *path,
-   [in,unique,string,charset(UTF16)] uint16 *server,
-   [in,unique,string,charset(UTF16)] uint16 *share,
-   [in] uint32 level,
+   [in,ref][string,charset(UTF16)] uint16 *path,
+   [in,unique] [string,charset(UTF16)] uint16 *server,
+   [in,unique] [string,charset(UTF16)] uint16 *share,
+   [in]uint32 level,
[out,switch_is(level)] dfs_Info *info
);
 
@@ -174,11 +174,11 @@
} dfs_EnumStruct;
 
WERROR dfs_Enum (
-   [in] uint32 level,
-   [in] uint32 bufsize,
-   [in,out,unique] dfs_EnumStruct *info,
+   [in]uint32 level,
+   [in]uint32 bufsize,
+   [in,out,unique] dfs_EnumStruct *info,
[in,unique] uint32 *unknown,
-   [in,out,unique] uint32 *total
+   [in,out,unique] uint32 *total
);
 
/* Function 0x06 */
@@ -228,12 +228,12 @@
 
/* Function 0x15 */
WERROR dfs_EnumEx(
-   [in,string,charset(UTF16)] uint16 *name,
-   [in] uint32 level,
-   [in] uint32 bufsize,
+   [in][string,charset(UTF16)] uint16 *name,
+   [in]uint32 level,
+   [in]uint32 bufsize,
[in,out,unique] dfs_EnumStruct *info,
[in,out,unique] uint32 *total
- );
+   );
 
/* Function 0x16 */
WERROR dfs_SetInfo2();



svn commit: samba r18628 - in branches/SAMBA_4_0/source/librpc/idl: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 20:19:43 + (Mon, 18 Sep 2006)
New Revision: 18628

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18628

Log:
dfs_EnumEx() also takes a ref pointer.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/dfs.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 20:18:50 UTC 
(rev 18627)
+++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 20:19:43 UTC 
(rev 18628)
@@ -228,11 +228,11 @@
 
/* Function 0x15 */
WERROR dfs_EnumEx(
-   [in][string,charset(UTF16)] uint16 *name,
-   [in]uint32 level,
-   [in]uint32 bufsize,
-   [in,out,unique] dfs_EnumStruct *info,
-   [in,out,unique] uint32 *total
+   [in,ref][string,charset(UTF16)] uint16 *name,
+   [in]uint32 level,
+   [in]uint32 bufsize,
+   [in,out,unique] dfs_EnumStruct *info,
+   [in,out,unique] uint32 *total
);
 
/* Function 0x16 */



svn commit: samba r18629 - in branches/SAMBA_4_0/source/librpc/idl: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 20:20:22 + (Mon, 18 Sep 2006)
New Revision: 18629

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18629

Log:
There is no such unknown pointer in dfs_Enum().

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/dfs.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 20:19:43 UTC 
(rev 18628)
+++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 20:20:22 UTC 
(rev 18629)
@@ -177,7 +177,6 @@
[in]uint32 level,
[in]uint32 bufsize,
[in,out,unique] dfs_EnumStruct *info,
-   [in,unique] uint32 *unknown,
[in,out,unique] uint32 *total
);
 



svn commit: samba r18630 - in branches/SAMBA_4_0/source/librpc/idl: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 20:21:52 + (Mon, 18 Sep 2006)
New Revision: 18630

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18630

Log:
Better way to display ref-pointers with [print]. Thanks to metze for
pointing this out.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/dfs.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 20:20:22 UTC 
(rev 18629)
+++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-18 20:21:52 UTC 
(rev 18630)
@@ -118,7 +118,7 @@
} dfs_Info;
 
WERROR dfs_GetInfo (
-   [in,ref][string,charset(UTF16)] uint16 *path,
+   [in][string,charset(UTF16)] uint16 path[],
[in,unique] [string,charset(UTF16)] uint16 *server,
[in,unique] [string,charset(UTF16)] uint16 *share,
[in]uint32 level,
@@ -227,7 +227,7 @@
 
/* Function 0x15 */
WERROR dfs_EnumEx(
-   [in,ref][string,charset(UTF16)] uint16 *name,
+   [in][string,charset(UTF16)] uint16 name[],
[in]uint32 level,
[in]uint32 bufsize,
[in,out,unique] dfs_EnumStruct *info,



svn commit: samba r18631 - in branches/SAMBA_4_0/source/torture/libnet: .

2006-09-18 Thread mimir
Author: mimir
Date: 2006-09-18 20:28:47 + (Mon, 18 Sep 2006)
New Revision: 18631

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18631

Log:
correct unintentional commit.


rafal


Modified:
   branches/SAMBA_4_0/source/torture/libnet/libnet_user.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_user.c
===
--- branches/SAMBA_4_0/source/torture/libnet/libnet_user.c  2006-09-18 
20:21:52 UTC (rev 18630)
+++ branches/SAMBA_4_0/source/torture/libnet/libnet_user.c  2006-09-18 
20:28:47 UTC (rev 18631)
@@ -527,7 +527,7 @@
req.in.user_name = name;

printf(Testing change of a single field\n);
-   set_test_changes(mem_ctx, req, 1, name, last_logoff);
+   set_test_changes(mem_ctx, req, 1, name, none);

status = libnet_ModifyUser(ctx, mem_ctx, req);
if (!NT_STATUS_IS_OK(status)) {



svn commit: samba r18632 - in branches/SAMBA_3_0/source/librpc/ndr: .

2006-09-18 Thread jelmer
Author: jelmer
Date: 2006-09-18 20:41:45 + (Mon, 18 Sep 2006)
New Revision: 18632

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18632

Log:
Make C++ compilers happy.

Modified:
   branches/SAMBA_3_0/source/librpc/ndr/libndr.h


Changeset:
Modified: branches/SAMBA_3_0/source/librpc/ndr/libndr.h
===
--- branches/SAMBA_3_0/source/librpc/ndr/libndr.h   2006-09-18 20:28:47 UTC 
(rev 18631)
+++ branches/SAMBA_3_0/source/librpc/ndr/libndr.h   2006-09-18 20:41:45 UTC 
(rev 18632)
@@ -247,7 +247,7 @@
if (!(mem_ctx)) {\
return ndr_pull_error(ndr, NDR_ERR_ALLOC, 
NDR_PULL_SET_MEM_CTX(NULL): %s\n, __location__); \
}\
-   ndr-current_mem_ctx = mem_ctx;\
+   ndr-current_mem_ctx = CONST_DISCARD(TALLOC_CTX *, mem_ctx);\
}\
 } while(0)
 
@@ -260,29 +260,28 @@
}\
 } while(0)
 
-#define NDR_PULL_ALLOC_SIZE(ndr, s, size) do { \
+#define NDR_PULL_ALLOC(ndr, s) do { \
_NDR_PULL_FIX_CURRENT_MEM_CTX(ndr);\
-   (s) = talloc_size(ndr-current_mem_ctx, size); \
-   if (!(s)) return ndr_pull_error(ndr, NDR_ERR_ALLOC, Alloc %u failed: 
%s\n,(unsigned)size, __location__); \
+   (s) = talloc_ptrtype(ndr-current_mem_ctx, (s)); \
+   if (!(s)) return ndr_pull_error(ndr, NDR_ERR_ALLOC, Alloc %s failed: 
%s\n, # s, __location__); \
 } while (0)
 
-#define NDR_PULL_ALLOC(ndr, s) NDR_PULL_ALLOC_SIZE(ndr, s, sizeof(*(s)))
-
-#define NDR_PULL_ALLOC_N_SIZE(ndr, s, n, elsize) do { \
+#define NDR_PULL_ALLOC_N(ndr, s, n) do { \
_NDR_PULL_FIX_CURRENT_MEM_CTX(ndr);\
-   (s) = talloc_array_size(ndr-current_mem_ctx, elsize, n); \
-   if (!(s)) return ndr_pull_error(ndr, NDR_ERR_ALLOC, Alloc %u * %u 
failed: %s\n, (unsigned)n, (unsigned)elsize, __location__); \
+   (s) = talloc_array_ptrtype(ndr-current_mem_ctx, (s), n); \
+   if (!(s)) return ndr_pull_error(ndr, NDR_ERR_ALLOC, Alloc %u * %s 
failed: %s\n, (unsigned)n, # s, __location__); \
 } while (0)
 
-#define NDR_PULL_ALLOC_N(ndr, s, n) NDR_PULL_ALLOC_N_SIZE(ndr, s, n, 
sizeof(*(s)))
 
-
 #define NDR_PUSH_ALLOC_SIZE(ndr, s, size) do { \
(s) = talloc_size(ndr, size); \
if (!(s)) return ndr_push_error(ndr, NDR_ERR_ALLOC, push alloc %u 
failed: %s\n, (unsigned)size, __location__); \
 } while (0)
 
-#define NDR_PUSH_ALLOC(ndr, s) NDR_PUSH_ALLOC_SIZE(ndr, s, sizeof(*(s)))
+#define NDR_PUSH_ALLOC(ndr, s) do { \
+   (s) = talloc_ptrtype(ndr, (s)); \
+   if (!(s)) return ndr_push_error(ndr, NDR_ERR_ALLOC, push alloc %s 
failed: %s\n, # s, __location__); \
+} while (0)
 
 /* these are used when generic fn pointers are needed for ndr push/pull fns */
 typedef NTSTATUS (*ndr_push_flags_fn_t)(struct ndr_push *, int ndr_flags, 
const void *);



svn commit: samba r18633 - in branches/SAMBA_4_0/source/libcli/util: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 20:44:54 + (Mon, 18 Sep 2006)
New Revision: 18633

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18633

Log:
Add a couple of new WERR codes encountered with dfs torture testing.

Guenther

Modified:
   branches/SAMBA_4_0/source/libcli/util/doserr.c
   branches/SAMBA_4_0/source/libcli/util/doserr.h


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/util/doserr.c
===
--- branches/SAMBA_4_0/source/libcli/util/doserr.c  2006-09-18 20:41:45 UTC 
(rev 18632)
+++ branches/SAMBA_4_0/source/libcli/util/doserr.c  2006-09-18 20:44:54 UTC 
(rev 18633)
@@ -36,9 +36,10 @@
{ WERR_BADFID, WERR_BADFID },
{ WERR_BADFUNC, WERR_BADFUNC },
{ WERR_BAD_NETPATH, WERR_BAD_NETPATH },
+   { WERR_UNEXP_NET_ERR, WERR_UNEXP_NET_ERR },
{ WERR_INSUFFICIENT_BUFFER, WERR_INSUFFICIENT_BUFFER },
{ WERR_NO_SUCH_SHARE, WERR_NO_SUCH_SHARE },
-   { WERR_ALREADY_EXISTS, WERR_ALREADY_EXISTS },
+   { WERR_FILE_EXISTS, WERR_FILE_EXISTS },
{ WERR_INVALID_PARAM, WERR_INVALID_PARAM },
{ WERR_NOT_SUPPORTED, WERR_NOT_SUPPORTED },
{ WERR_BAD_PASSWORD, WERR_BAD_PASSWORD },
@@ -46,6 +47,7 @@
{ WERR_INVALID_NAME, WERR_INVALID_NAME },
{ WERR_UNKNOWN_LEVEL, WERR_UNKNOWN_LEVEL },
{ WERR_OBJECT_PATH_INVALID, WERR_OBJECT_PATH_INVALID },
+   { WERR_ALREADY_EXISTS, WERR_ALREADY_EXISTS },
{ WERR_NO_MORE_ITEMS, WERR_NO_MORE_ITEMS },
{ WERR_MORE_DATA, WERR_MORE_DATA },
{ WERR_UNKNOWN_PRINTER_DRIVER, WERR_UNKNOWN_PRINTER_DRIVER },
@@ -55,10 +57,12 @@
{ WERR_INVALID_ENVIRONMENT, WERR_INVALID_ENVIRONMENT },
{ WERR_INVALID_FORM_NAME, WERR_INVALID_FORM_NAME },
{ WERR_INVALID_FORM_SIZE, WERR_INVALID_FORM_SIZE },
+   { WERR_ALREADY_SHARED, WERR_ALREADY_SHARED },
{ WERR_BUF_TOO_SMALL, WERR_BUF_TOO_SMALL },
{ WERR_JOB_NOT_FOUND, WERR_JOB_NOT_FOUND },
{ WERR_DEST_NOT_FOUND, WERR_DEST_NOT_FOUND },
{ WERR_NOT_LOCAL_DOMAIN, WERR_NOT_LOCAL_DOMAIN },
+   { WERR_DEVICE_NOT_AVAILABLE, WERR_DEVICE_NOT_AVAILABLE },
{ WERR_PRINTER_DRIVER_IN_USE, WERR_PRINTER_DRIVER_IN_USE },
{ WERR_STATUS_MORE_ENTRIES, WERR_STATUS_MORE_ENTRIES },
{ WERR_NET_NAME_NOT_FOUND, WERR_NET_NAME_NOT_FOUND },
@@ -97,6 +101,7 @@
{ WERR_PRINTQ_FULL, WERR_PRINTQ_FULL },
{ WERR_NO_SPOOL_SPACE, WERR_NO_SPOOL_SPACE },
{ WERR_CAN_NOT_COMPLETE, WERR_CAN_NOT_COMPLETE },
+   { WERR_NOT_FOUND, WERR_NOT_FOUND },
{ WERR_SERVER_UNAVAILABLE, WERR_SERVER_UNAVAILABLE },
{ WERR_CLASS_NOT_REGISTERED, WERR_CLASS_NOT_REGISTERED },
{ WERR_NO_SHUTDOWN_IN_PROGRESS, WERR_NO_SHUTDOWN_IN_PROGRESS },

Modified: branches/SAMBA_4_0/source/libcli/util/doserr.h
===
--- branches/SAMBA_4_0/source/libcli/util/doserr.h  2006-09-18 20:41:45 UTC 
(rev 18632)
+++ branches/SAMBA_4_0/source/libcli/util/doserr.h  2006-09-18 20:44:54 UTC 
(rev 18633)
@@ -174,19 +174,22 @@
 #define WERR_GENERAL_FAILURE W_ERROR(31)
 #define WERR_NOT_SUPPORTED W_ERROR(50)
 #define WERR_BAD_NETPATH W_ERROR(53)
+#define WERR_UNEXP_NET_ERR W_ERROR(59)
 #define WERR_PRINTQ_FULL W_ERROR(61)
 #define WERR_NO_SPOOL_SPACE W_ERROR(62)
 #define WERR_NO_SUCH_SHARE W_ERROR(67)
-#define WERR_ALREADY_EXISTS W_ERROR(80)
+#define WERR_FILE_EXISTS W_ERROR(80)
 #define WERR_BAD_PASSWORD W_ERROR(86)
 #define WERR_INVALID_PARAM W_ERROR(87)
 #define WERR_INSUFFICIENT_BUFFER W_ERROR(122)
 #define WERR_INVALID_NAME W_ERROR(123)
 #define WERR_UNKNOWN_LEVEL W_ERROR(124)
 #define WERR_OBJECT_PATH_INVALID W_ERROR(161)
+#define WERR_ALREADY_EXISTS W_ERROR(183)
 #define WERR_NO_MORE_ITEMS W_ERROR(259)
 #define WERR_MORE_DATA W_ERROR(234)
 #define WERR_CAN_NOT_COMPLETE W_ERROR(1003)
+#define WERR_NOT_FOUND W_ERROR(1168)
 #define WERR_INVALID_COMPUTERNAME W_ERROR(1210)
 #define WERR_INVALID_DOMAINNAME W_ERROR(1212)
 #define WERR_UNKNOWN_REVISION W_ERROR(1305)
@@ -200,10 +203,12 @@
 #define WERR_SERVER_UNAVAILABLE W_ERROR(1722)
 #define WERR_INVALID_FORM_NAME W_ERROR(1902)
 #define WERR_INVALID_FORM_SIZE W_ERROR(1903)
+#define WERR_ALREADY_SHARED W_ERROR(2118)
 #define WERR_BUF_TOO_SMALL W_ERROR(2123)
 #define WERR_JOB_NOT_FOUND W_ERROR(2151)
 #define WERR_DEST_NOT_FOUND W_ERROR(2152)
 #define WERR_NOT_LOCAL_DOMAIN W_ERROR(2320)
+#define WERR_DEVICE_NOT_AVAILABLE W_ERROR(4319)
 #define WERR_STATUS_MORE_ENTRIES   W_ERROR(0x0105)
 
 #define WERR_PRINTER_DRIVER_ALREADY_INSTALLED 
W_ERROR(ERRdriveralreadyinstalled)



svn commit: samba r18634 - in branches/SAMBA_4_0/source/librpc/idl: .

2006-09-18 Thread jelmer
Author: jelmer
Date: 2006-09-18 20:52:26 + (Mon, 18 Sep 2006)
New Revision: 18634

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18634

Log:
Turn flags field into a bitmap.

Modified:
   branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl 2006-09-18 20:44:54 UTC 
(rev 18633)
+++ branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl 2006-09-18 20:52:26 UTC 
(rev 18634)
@@ -474,8 +474,16 @@
[size_is(count)] srvsvc_NetShareInfo1004 *array;
} srvsvc_NetShareCtr1004;
 
+   typedef bitmap {
+   SHARE_1005_IN_DFS   = 0x0001,
+   SHARE_1005_DFS_ROOT = 0x0002
+   } NetShareInfo1005Flags;
+   
+   const uint32 SHARE_1005_CSC_POLICY_MASK = 0x0030;
+   const uint32 SHARE_1005_CSC_POLICY_SHIFT = 4;
+
typedef struct {
-   uint32 dfs_flags;
+   NetShareInfo1005Flags dfs_flags;
} srvsvc_NetShareInfo1005;
 
typedef struct {



svn commit: samba r18635 - in branches/SAMBA_4_0/source/librpc/idl: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 20:56:54 + (Mon, 18 Sep 2006)
New Revision: 18635

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18635

Log:
Make sure to display samr_GroupAttrs in samr_DispInfo for groups instead
of interpreting them as samr_AcctFlags.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/samr.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/samr.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/samr.idl   2006-09-18 20:52:26 UTC 
(rev 18634)
+++ branches/SAMBA_4_0/source/librpc/idl/samr.idl   2006-09-18 20:56:54 UTC 
(rev 18635)
@@ -880,6 +880,19 @@
 
typedef struct {
uint32idx;
+   uint32rid;
+   samr_GroupAttrs acct_flags;
+   lsa_String account_name;
+   lsa_String description;
+   } samr_DispEntryFullGroup;
+
+   typedef struct {
+   uint32 count;
+   [size_is(count)] samr_DispEntryFullGroup *entries;
+   } samr_DispInfoFullGroups;
+
+   typedef struct {
+   uint32idx;
lsa_AsciiString account_name;
} samr_DispEntryAscii;
 
@@ -891,7 +904,7 @@
typedef [switch_type(uint16)] union {
[case(1)] samr_DispInfoGeneral info1;/* users */
[case(2)] samr_DispInfoFull info2; /* trust accounts? */
-   [case(3)] samr_DispInfoFull info3; /* groups */
+   [case(3)] samr_DispInfoFullGroups info3; /* groups */
[case(4)] samr_DispInfoAscii info4; /* users */
[case(5)] samr_DispInfoAscii info5; /* groups */
} samr_DispInfo;



svn commit: samba r18636 - in branches/SAMBA_4_0/source: dsdb/samdb kdc librpc/idl

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 21:00:00 + (Mon, 18 Sep 2006)
New Revision: 18636

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18636

Log:
Excessive testing with pam_winbind within Samba3 revealed a new samr
reject reason code while password changing: SAMR_REJECT_IN_HISTORY which
is different from SAMR_REJECT_COMPLEXITY.

torture test to follow as well.

Guenther

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/samdb.c
   branches/SAMBA_4_0/source/kdc/kpasswdd.c
   branches/SAMBA_4_0/source/librpc/idl/misc.idl


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/samdb.c2006-09-18 20:56:54 UTC 
(rev 18635)
+++ branches/SAMBA_4_0/source/dsdb/samdb/samdb.c2006-09-18 21:00:00 UTC 
(rev 18636)
@@ -1282,13 +1282,13 @@
if (pwdHistoryLength  0) {
if (lmNewHash  lmPwdHash  memcmp(lmNewHash-hash, 
lmPwdHash-hash, 16) == 0) {
if (reject_reason) {
-   *reject_reason = SAMR_REJECT_COMPLEXITY;
+   *reject_reason = SAMR_REJECT_IN_HISTORY;
}
return NT_STATUS_PASSWORD_RESTRICTION;
}
if (ntNewHash  ntPwdHash  memcmp(ntNewHash-hash, 
ntPwdHash-hash, 16) == 0) {
if (reject_reason) {
-   *reject_reason = SAMR_REJECT_COMPLEXITY;
+   *reject_reason = SAMR_REJECT_IN_HISTORY;
}
return NT_STATUS_PASSWORD_RESTRICTION;
}
@@ -1301,7 +1301,7 @@
for (i=0; lmNewHash  isambaLMPwdHistory_len;i++) {
if (memcmp(lmNewHash-hash, sambaLMPwdHistory[i].hash, 
16) == 0) {
if (reject_reason) {
-   *reject_reason = SAMR_REJECT_COMPLEXITY;
+   *reject_reason = SAMR_REJECT_IN_HISTORY;
}
return NT_STATUS_PASSWORD_RESTRICTION;
}
@@ -1309,7 +1309,7 @@
for (i=0; ntNewHash  isambaNTPwdHistory_len;i++) {
if (memcmp(ntNewHash-hash, sambaNTPwdHistory[i].hash, 
16) == 0) {
if (reject_reason) {
-   *reject_reason = SAMR_REJECT_COMPLEXITY;
+   *reject_reason = SAMR_REJECT_IN_HISTORY;
}
return NT_STATUS_PASSWORD_RESTRICTION;
}

Modified: branches/SAMBA_4_0/source/kdc/kpasswdd.c
===
--- branches/SAMBA_4_0/source/kdc/kpasswdd.c2006-09-18 20:56:54 UTC (rev 
18635)
+++ branches/SAMBA_4_0/source/kdc/kpasswdd.c2006-09-18 21:00:00 UTC (rev 
18636)
@@ -134,6 +134,9 @@
case SAMR_REJECT_COMPLEXITY:
reject_string = Password does not meet complexity 
requirements;
break;
+   case SAMR_REJECT_IN_HISTORY:
+   reject_string = Password is already in password 
history;
+   break;
case SAMR_REJECT_OTHER:
default:
reject_string = talloc_asprintf(mem_ctx, Password must 
be at least %d characters long, and cannot match any of your %d previous 
passwords,

Modified: branches/SAMBA_4_0/source/librpc/idl/misc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/misc.idl   2006-09-18 20:56:54 UTC 
(rev 18635)
+++ branches/SAMBA_4_0/source/librpc/idl/misc.idl   2006-09-18 21:00:00 UTC 
(rev 18636)
@@ -40,7 +40,8 @@
typedef [public,v1_enum] enum {
SAMR_REJECT_OTHER  = 0,
SAMR_REJECT_TOO_SHORT  = 1,
-   SAMR_REJECT_COMPLEXITY = 2
+   SAMR_REJECT_IN_HISTORY = 2,
+   SAMR_REJECT_COMPLEXITY = 5
} samr_RejectReason;
 
 



svn commit: samba r18637 - in branches/SAMBA_4_0/source/torture/rpc: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-18 21:03:03 + (Mon, 18 Sep 2006)
New Revision: 18637

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18637

Log:
Fix the build. Sorry,

Guenther

Modified:
   branches/SAMBA_4_0/source/torture/rpc/dfs.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/dfs.c
===
--- branches/SAMBA_4_0/source/torture/rpc/dfs.c 2006-09-18 21:00:00 UTC (rev 
18636)
+++ branches/SAMBA_4_0/source/torture/rpc/dfs.c 2006-09-18 21:03:03 UTC (rev 
18637)
@@ -88,7 +88,6 @@
r.in.level = level;
r.in.bufsize = (uint32_t)-1;
r.in.total = total;
-   r.in.unknown = total;
r.in.info = e;
 
e.level = r.in.level;



svn commit: samba r18638 - in branches/SAMBA_3_0/source: .

2006-09-18 Thread vlendec
Author: vlendec
Date: 2006-09-18 21:29:08 + (Mon, 18 Sep 2006)
New Revision: 18638

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18638

Log:
This is an attempt to fix the AIX build. Jeremy, as you are busy talking
SASL/Steve/Andrew I can't right now ask why the aio.h is needed for the
timespec test.

Might have to revert that soon.

Volker

Modified:
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-09-18 21:03:03 UTC (rev 
18637)
+++ branches/SAMBA_3_0/source/configure.in  2006-09-18 21:29:08 UTC (rev 
18638)
@@ -1129,9 +1129,6 @@
 #  include time.h
 # endif
 #endif
-#if HAVE_AIO_H
-#include aio.h
-#endif
 ],[struct timespec ts;],
samba_cv_struct_timespec=yes,samba_cv_struct_timespec=no)])
 if test x$samba_cv_struct_timespec = xyes; then



svn commit: samba r18639 - in branches/SAMBA_4_0/source: gtk/tools librpc/idl pidl/lib/Parse/Pidl pidl/lib/Parse/Pidl/Samba4 pidl/lib/Parse/Pidl/Samba4/NDR torture/rpc

2006-09-18 Thread jelmer
Author: jelmer
Date: 2006-09-18 21:52:00 + (Mon, 18 Sep 2006)
New Revision: 18639

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18639

Log:
Get rid of the keepref support
Modified:
   branches/SAMBA_4_0/source/gtk/tools/gwcrontab.c
   branches/SAMBA_4_0/source/librpc/idl/dcom.idl
   branches/SAMBA_4_0/source/librpc/idl/dfs.idl
   branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl
   branches/SAMBA_4_0/source/librpc/idl/echo.idl
   branches/SAMBA_4_0/source/librpc/idl/epmapper.idl
   branches/SAMBA_4_0/source/librpc/idl/eventlog.idl
   branches/SAMBA_4_0/source/librpc/idl/frsapi.idl
   branches/SAMBA_4_0/source/librpc/idl/frsrpc.idl
   branches/SAMBA_4_0/source/librpc/idl/initshutdown.idl
   branches/SAMBA_4_0/source/librpc/idl/irpc.idl
   branches/SAMBA_4_0/source/librpc/idl/lsa.idl
   branches/SAMBA_4_0/source/librpc/idl/netlogon.idl
   branches/SAMBA_4_0/source/librpc/idl/orpc.idl
   branches/SAMBA_4_0/source/librpc/idl/oxidresolver.idl
   branches/SAMBA_4_0/source/librpc/idl/remact.idl
   branches/SAMBA_4_0/source/librpc/idl/rot.idl
   branches/SAMBA_4_0/source/librpc/idl/samr.idl
   branches/SAMBA_4_0/source/librpc/idl/spoolss.idl
   branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl
   branches/SAMBA_4_0/source/librpc/idl/svcctl.idl
   branches/SAMBA_4_0/source/librpc/idl/unixinfo.idl
   branches/SAMBA_4_0/source/librpc/idl/winreg.idl
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
   branches/SAMBA_4_0/source/torture/rpc/atsvc.c
   branches/SAMBA_4_0/source/torture/rpc/oxidresolve.c


Changeset:
Sorry, the patch is too large (823 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18639


svn commit: samba r18640 - in branches/SAMBA_3_0/source: . include lib lib/socket_wrapper

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 22:12:56 + (Mon, 18 Sep 2006)
New Revision: 18640

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18640

Log:
move to socket_wrapper to lib/socket_wrapper/
and sync it with samba4

metze

Added:
   branches/SAMBA_3_0/source/lib/socket_wrapper/
   branches/SAMBA_3_0/source/lib/socket_wrapper/config.m4
   branches/SAMBA_3_0/source/lib/socket_wrapper/socket_wrapper.c
   branches/SAMBA_3_0/source/lib/socket_wrapper/socket_wrapper.h
Removed:
   branches/SAMBA_3_0/source/include/socket_wrapper.h
   branches/SAMBA_3_0/source/lib/socket_wrapper.c
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/include/includes.h


Changeset:
Sorry, the patch is too large (2059 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18640


svn commit: samba r18642 - in branches/SAMBA_3_0/source/librpc/idl: .

2006-09-18 Thread jerry
Author: jerry
Date: 2006-09-18 22:27:37 + (Mon, 18 Sep 2006)
New Revision: 18642

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18642

Log:
convert [out] parameters to pointers in Spooler IDL
Modified:
   branches/SAMBA_3_0/source/librpc/idl/spoolss.idl


Changeset:
Modified: branches/SAMBA_3_0/source/librpc/idl/spoolss.idl
===
--- branches/SAMBA_3_0/source/librpc/idl/spoolss.idl2006-09-18 22:20:37 UTC 
(rev 18641)
+++ branches/SAMBA_3_0/source/librpc/idl/spoolss.idl2006-09-18 22:27:37 UTC 
(rev 18642)
@@ -105,6 +105,7 @@
PRINTER_ENUM_REMOTE  = 0x0010,
PRINTER_ENUM_SHARED  = 0x0020,
PRINTER_ENUM_NETWORK = 0x0040,
+   PRINTER_ENUM_UNKNOWN_8   = 0x0008,
PRINTER_ENUM_EXPAND  = 0x4000,
PRINTER_ENUM_CONTAINER   = 0x8000,
PRINTER_ENUM_ICON1   = 0x0001,
@@ -259,8 +260,8 @@
[in] DATA_BLOB *buffer,
[in] uint32 offered,
[out] DATA_BLOB *info,
-   [out] uint32 needed,
-   [out] uint32 count
+   [out] uint32 *needed,
+   [out] uint32 *count
);
[public,noopnum,noprint] void __spoolss_EnumPrinters(
[in] uint32 level,
@@ -277,8 +278,8 @@
 * and the array has no size in front
 */
[out,switch_is(level),size_is(count)] spoolss_PrinterInfo *info,
-   [out] uint32 needed,
-   [out] uint32 count
+   [out] uint32 *needed,
+   [out] uint32 *count
);
 
/**/
@@ -352,7 +353,7 @@
[in] DATA_BLOB *buffer,
[in] uint32 offered,
[out,subcontext(4),subcontext_size(offered),switch_is(level)] 
spoolss_JobInfo *info,
-   [out]uint32 needed
+   [out]uint32 *needed
);
 
/**/
@@ -365,8 +366,8 @@
[in] DATA_BLOB *buffer,
[in] uint32 offered,
[out]DATA_BLOB *info,
-   [out]uint32 needed,
-   [out]uint32 count
+   [out]uint32 *needed,
+   [out]uint32 *count
);
[public,noopnum,noprint] void __spoolss_EnumJobs(
[in] uint32 level,
@@ -381,8 +382,8 @@
[in] DATA_BLOB *buffer,
[in] uint32 offered,
[out,switch_is(level),size_is(count)] spoolss_JobInfo *info,
-   [out]uint32 needed,
-   [out]uint32 count
+   [out]uint32 *needed,
+   [out]uint32 *count
);
 
/**/
@@ -438,7 +439,7 @@
[in] DATA_BLOB *buffer,
[in] uint32 offered,
[out,subcontext(4),subcontext_size(offered),switch_is(level)] 
spoolss_PrinterInfo *info,
-   [out]uint32 needed
+   [out]uint32 *needed
);
 
/**/
@@ -544,8 +545,8 @@
[in] DATA_BLOB *buffer,
[in] uint32 offered,
[out] DATA_BLOB *info,
-   [out] uint32 needed,
-   [out] uint32 count
+   [out] uint32 *needed,
+   [out] uint32 *count
);
[public,noopnum,noprint] void __spoolss_EnumPrinterDrivers(
[in] uint32 level,
@@ -559,8 +560,8 @@
[in] DATA_BLOB *buffer,
[in] uint32 offered,
[out,switch_is(level),size_is(count)] spoolss_DriverInfo *info,
-   [out] uint32 needed,
-   [out] uint32 count
+   [out] uint32 *needed,
+   [out] uint32 *count
);
 
/**/
@@ -589,7 +590,7 @@
[in] DATA_BLOB *buffer,
[in] uint32 offered,
[out,subcontext(4),subcontext_size(offered),switch_is(level)] 
spoolss_DriverDirectoryInfo *info,
-   [out] uint32 needed
+   [out] uint32 *needed
);
 
/**/
@@ -624,8 +625,8 @@
[in] DATA_BLOB *buffer,
[in] uint32 offered,
[out] DATA_BLOB *info,
-   [out] uint32 needed,
-   [out] uint32 count
+   [out] uint32 *needed,
+   [out] uint32 *count
);
[public,noopnum,noprint] void __spoolss_EnumPrintProcessors(
[in] uint32 level,
@@ -639,8 +640,8 @@
[in] DATA_BLOB *buffer,
[in] uint32 offered,
[out,switch_is(level),size_is(count)] 
spoolss_PrintProcessorInfo *info,
-   [out] uint32 needed,
-   [out] uint32 count
+   [out] uint32 

svn commit: samba r18643 - in branches/SAMBA_3_0/source/utils: .

2006-09-18 Thread vlendec
Author: vlendec
Date: 2006-09-18 22:32:23 + (Mon, 18 Sep 2006)
New Revision: 18643

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18643

Log:
Fix a 64-bit warning
Modified:
   branches/SAMBA_3_0/source/utils/net_rpc.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc.c
===
--- branches/SAMBA_3_0/source/utils/net_rpc.c   2006-09-18 22:27:37 UTC (rev 
18642)
+++ branches/SAMBA_3_0/source/utils/net_rpc.c   2006-09-18 22:32:23 UTC (rev 
18643)
@@ -462,7 +462,7 @@
TALLOC_CTX *ctx = talloc_init(rpc_info_internals);
d_printf(Domain Name: %s\n, unistr2_tdup(ctx, 
ctr.info.inf2.uni_domain));
d_printf(Domain SID: %s\n, sid_str);
-   d_printf(Sequence number: %llu\n, ctr.info.inf2.seq_num);
+   d_printf(Sequence number: %llu\n, (unsigned long 
long)ctr.info.inf2.seq_num);
d_printf(Num users: %u\n, ctr.info.inf2.num_domain_usrs);
d_printf(Num domain groups: %u\n, 
ctr.info.inf2.num_domain_grps);
d_printf(Num local groups: %u\n, 
ctr.info.inf2.num_local_grps);



svn commit: samba r18644 - in branches/SAMBA_3_0/source: . include lib lib/replace lib/replace/system lib/replace/test

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 22:49:20 + (Mon, 18 Sep 2006)
New Revision: 18644

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18644

Log:
bring in libreplace in lib/replace

metze

Added:
   branches/SAMBA_3_0/source/lib/replace/
   branches/SAMBA_3_0/source/lib/replace/Makefile.in
   branches/SAMBA_3_0/source/lib/replace/README
   branches/SAMBA_3_0/source/lib/replace/aclocal.m4
   branches/SAMBA_3_0/source/lib/replace/autoconf-2.60.m4
   branches/SAMBA_3_0/source/lib/replace/autogen.sh
   branches/SAMBA_3_0/source/lib/replace/config.guess
   branches/SAMBA_3_0/source/lib/replace/config.sub
   branches/SAMBA_3_0/source/lib/replace/configure.ac
   branches/SAMBA_3_0/source/lib/replace/dlfcn.c
   branches/SAMBA_3_0/source/lib/replace/dlfcn.m4
   branches/SAMBA_3_0/source/lib/replace/getpass.c
   branches/SAMBA_3_0/source/lib/replace/getpass.m4
   branches/SAMBA_3_0/source/lib/replace/install-sh
   branches/SAMBA_3_0/source/lib/replace/libreplace.m4
   branches/SAMBA_3_0/source/lib/replace/libreplace_cc.m4
   branches/SAMBA_3_0/source/lib/replace/libreplace_macros.m4
   branches/SAMBA_3_0/source/lib/replace/repdir.m4
   branches/SAMBA_3_0/source/lib/replace/repdir_getdents.c
   branches/SAMBA_3_0/source/lib/replace/repdir_getdirentries.c
   branches/SAMBA_3_0/source/lib/replace/replace.c
   branches/SAMBA_3_0/source/lib/replace/replace.h
   branches/SAMBA_3_0/source/lib/replace/samba.m4
   branches/SAMBA_3_0/source/lib/replace/snprintf.c
   branches/SAMBA_3_0/source/lib/replace/system/
   branches/SAMBA_3_0/source/lib/replace/system/README
   branches/SAMBA_3_0/source/lib/replace/system/capability.h
   branches/SAMBA_3_0/source/lib/replace/system/config.m4
   branches/SAMBA_3_0/source/lib/replace/system/dir.h
   branches/SAMBA_3_0/source/lib/replace/system/filesys.h
   branches/SAMBA_3_0/source/lib/replace/system/glob.h
   branches/SAMBA_3_0/source/lib/replace/system/iconv.h
   branches/SAMBA_3_0/source/lib/replace/system/kerberos.h
   branches/SAMBA_3_0/source/lib/replace/system/locale.h
   branches/SAMBA_3_0/source/lib/replace/system/network.h
   branches/SAMBA_3_0/source/lib/replace/system/passwd.h
   branches/SAMBA_3_0/source/lib/replace/system/printing.h
   branches/SAMBA_3_0/source/lib/replace/system/readline.h
   branches/SAMBA_3_0/source/lib/replace/system/select.h
   branches/SAMBA_3_0/source/lib/replace/system/shmem.h
   branches/SAMBA_3_0/source/lib/replace/system/syslog.h
   branches/SAMBA_3_0/source/lib/replace/system/terminal.h
   branches/SAMBA_3_0/source/lib/replace/system/time.h
   branches/SAMBA_3_0/source/lib/replace/system/wait.h
   branches/SAMBA_3_0/source/lib/replace/test/
   branches/SAMBA_3_0/source/lib/replace/test/os2_delete.c
   branches/SAMBA_3_0/source/lib/replace/test/shared_mmap.c
   branches/SAMBA_3_0/source/lib/replace/test/testsuite.c
   branches/SAMBA_3_0/source/lib/replace/timegm.c
   branches/SAMBA_3_0/source/lib/replace/timegm.m4
   branches/SAMBA_3_0/source/lib/replace/win32.m4
   branches/SAMBA_3_0/source/lib/replace/win32_replace.h
Removed:
   branches/SAMBA_3_0/source/lib/replace.c
   branches/SAMBA_3_0/source/lib/replace1.c
   branches/SAMBA_3_0/source/lib/snprintf.c
   branches/SAMBA_3_0/source/lib/timegm.c
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/aclocal.m4
   branches/SAMBA_3_0/source/autogen.sh
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/include/includes.h


Changeset:
Sorry, the patch is too large (12436 lines) to include; please use WebSVN to 
see it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18644


svn commit: samba r18645 - in branches/SAMBA_3_0/source/lib/replace: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 22:52:49 + (Mon, 18 Sep 2006)
New Revision: 18645

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18645

Log:
ignore generated files

metze

Modified:
   branches/SAMBA_3_0/source/lib/replace/


Changeset:

Property changes on: branches/SAMBA_3_0/source/lib/replace
___
Name: svn:ignore
   + *.po




svn commit: samba r18646 - in branches/SAMBA_3_0/source/lib/socket_wrapper: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 22:55:10 + (Mon, 18 Sep 2006)
New Revision: 18646

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18646

Log:
now we can have the socket_wrapper.c completely in sync with samba4

metze

Modified:
   branches/SAMBA_3_0/source/lib/socket_wrapper/socket_wrapper.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/socket_wrapper/socket_wrapper.c
===
--- branches/SAMBA_3_0/source/lib/socket_wrapper/socket_wrapper.c   
2006-09-18 22:52:49 UTC (rev 18645)
+++ branches/SAMBA_3_0/source/lib/socket_wrapper/socket_wrapper.c   
2006-09-18 22:55:10 UTC (rev 18646)
@@ -24,10 +24,9 @@
 
 #define SOCKET_WRAPPER_NOT_REPLACE
 #include includes.h
-/*
 #include system/network.h
 #include system/filesys.h
-*/
+
 #ifndef _DLINKLIST_H
 #include lib/util/dlinklist.h
 #endif



svn commit: samba r18647 - in branches/SAMBA_3_0/source: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 23:16:39 + (Mon, 18 Sep 2006)
New Revision: 18647

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18647

Log:
print out the failing cammand, this is very usefull for the build farm

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-18 22:55:10 UTC (rev 
18646)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-09-18 23:16:39 UTC (rev 
18647)
@@ -891,9 +891,26 @@
  $(CC_CHECKER) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $ -o $@;\
 fi
@echo Compiling $*.c
-   @$(CC) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $ -o $@ 
+   @$(CC) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $ -o $@  exit 0;\
+   echo The following command failed: 12;\
+   echo $(CC) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $ -o $@ 
12;\
+   $(CC) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $ -o $@ 
/dev/null 21
 @BROKEN_CC@-mv `echo $@ | sed 's%^.*/%%g'` $@
 
[EMAIL PROTECTED]@:
+   @if (:  $@ || :  $@) /dev/null 21; then rm -f $@; else \
+ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
+   @if test -n $(CC_CHECKER); then \
+ echo Checking  $*.c with '$(CC_CHECKER)' and @PICFLAGS@;\
+ $(CC_CHECKER) -I. -I$(srcdir) $(FLAGS) @PICFLAGS@ -c $ -o [EMAIL 
PROTECTED]@;\
+fi
+   @echo Compiling $*.c with @PICFLAGS@
+   @$(CC) -I. -I$(srcdir) $(FLAGS) @PICFLAGS@ -c $ -o [EMAIL PROTECTED]@ 
 exit 0;\
+   echo The following command failed: 12;\
+   echo $(CC) -I. -I$(srcdir) $(FLAGS) @PICFLAGS@ -c $ -o [EMAIL 
PROTECTED]@ 12;\
+   $(CC) -I. -I$(srcdir) $(FLAGS) @PICFLAGS@ -c $ -o [EMAIL 
PROTECTED]@ /dev/null 21
[EMAIL PROTECTED]@  -mv `echo $@ | sed -e 's%^.*/%%g' -e '[EMAIL 
PROTECTED]@$$%.o%'` $@
+
 # this adds support for precompiled headers. To use it, install a snapshot
 # of gcc-3.4 and run 'make pch' before you do the main build. 
 pch: proto_exists
@@ -936,17 +953,6 @@
@echo Generating $@
@dir=smbd $(MAKEDIR)  $(AWK) -f $(srcdir)/script/mkbuildoptions.awk  
$(builddir)/smbd/build_options.c  $(srcdir)/include/config.h.in
 
[EMAIL PROTECTED]@:
-   @if (:  $@ || :  $@) /dev/null 21; then rm -f $@; else \
- dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
-   @if test -n $(CC_CHECKER); then \
- echo Checking  $*.c with '$(CC_CHECKER)' and @PICFLAGS@;\
- $(CC_CHECKER) -I. -I$(srcdir) $(FLAGS) @PICFLAGS@ -c $ -o [EMAIL 
PROTECTED]@;\
-fi
-   @echo Compiling $*.c with @PICFLAGS@
-   @$(CC) -I. -I$(srcdir) $(FLAGS) @PICFLAGS@ -c $ -o [EMAIL PROTECTED]@
[EMAIL PROTECTED]@  -mv `echo $@ | sed -e 's%^.*/%%g' -e '[EMAIL 
PROTECTED]@$$%.o%'` $@
-
 bin/.dummy:
@if (:  $@ || :  $@) /dev/null 21; then :; else \
  dir=bin $(MAKEDIR); fi



svn commit: samba r18650 - in branches/SAMBA_3_0/source/include: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 23:27:36 + (Mon, 18 Sep 2006)
New Revision: 18650

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18650

Log:
this isn't needed twice in include/includes.h

metze

Modified:
   branches/SAMBA_3_0/source/include/includes.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/includes.h
===
--- branches/SAMBA_3_0/source/include/includes.h2006-09-18 23:26:14 UTC 
(rev 18649)
+++ branches/SAMBA_3_0/source/include/includes.h2006-09-18 23:27:36 UTC 
(rev 18650)
@@ -66,15 +66,6 @@
 #undef HAVE_TERMIOS_H
 #endif
 
-#ifdef __GNUC__
-/** gcc attribute used on function parameters so that it does not emit
- * warnings about them being unused. **/
-#  define UNUSED(param) param __attribute__ ((unused))
-#else
-#  define UNUSED(param) param
-/** Feel free to add definitions for other compilers here. */
-#endif
-
 #ifndef _PUBLIC_
 #ifdef HAVE_VISIBILITY_ATTR
 #  define _PUBLIC_ __attribute__((visibility(default)))



svn commit: samba r18651 - in branches/SAMBA_3_0/source/include: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 23:28:46 + (Mon, 18 Sep 2006)
New Revision: 18651

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18651

Log:
this comment is wrong, was cut'n'paste...

metze

Modified:
   branches/SAMBA_3_0/source/include/includes.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/includes.h
===
--- branches/SAMBA_3_0/source/include/includes.h2006-09-18 23:27:36 UTC 
(rev 18650)
+++ branches/SAMBA_3_0/source/include/includes.h2006-09-18 23:28:46 UTC 
(rev 18651)
@@ -76,10 +76,6 @@
 
 #ifndef NORETURN_ATTRIBUTE
 #if (__GNUC__ = 3)
-/** Use gcc attribute to check printf fns.  a1 is the 1-based index of
- * the parameter containing the format, and a2 the index of the first
- * argument. Note that some gcc 2.x versions don't handle this
- * properly **/
 #define NORETURN_ATTRIBUTE __attribute__ ((noreturn))
 #else
 #define NORETURN_ATTRIBUTE



svn commit: samba r18653 - in branches/SAMBA_3_0/source/include: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-18 23:47:36 + (Mon, 18 Sep 2006)
New Revision: 18653

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18653

Log:
this stuff is in libreplace...

metze

Modified:
   branches/SAMBA_3_0/source/include/includes.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/includes.h
===
--- branches/SAMBA_3_0/source/include/includes.h2006-09-18 23:46:58 UTC 
(rev 18652)
+++ branches/SAMBA_3_0/source/include/includes.h2006-09-18 23:47:36 UTC 
(rev 18653)
@@ -908,20 +908,6 @@
 #define MAX(a,b) ((a)(b)?(a):(b))
 #endif
 
-#ifndef _BOOL
-typedef int BOOL;
-#define _BOOL   /* So we don't typedef BOOL again in vfs.h */
-#endif
-
-#ifndef HAVE_STRERROR
-extern char *sys_errlist[];
-#define strerror(i) sys_errlist[i]
-#endif
-
-#ifndef HAVE_ERRNO_DECL
-extern int errno;
-#endif
-
 #ifdef HAVE_BROKEN_GETGROUPS
 #define GID_T int
 #else
@@ -1159,10 +1145,6 @@
 #define PASSWORD_LENGTH 8
 #endif
 
-#ifdef REPLACE_INET_NTOA
-#define inet_ntoa rep_inet_ntoa
-#endif
-
 #ifndef HAVE_PIPE
 #define SYNC_DNS 1
 #endif
@@ -1191,58 +1173,6 @@
 #define ULTRIX_AUTH 1
 #endif
 
-#ifndef HAVE_STRDUP
-char *strdup(const char *s);
-#endif
-
-#ifndef HAVE_STRNDUP
-char *strndup(const char *s, size_t size);
-#endif
-
-#ifndef HAVE_MEMMOVE
-void *memmove(void *dest,const void *src,int size);
-#endif
-
-#ifndef HAVE_INITGROUPS
-int initgroups(char *name,gid_t id);
-#endif
-
-#ifndef HAVE_RENAME
-int rename(const char *zfrom, const char *zto);
-#endif
-
-#ifndef HAVE_MKTIME
-time_t mktime(struct tm *t);
-#endif
-
-#ifndef HAVE_STRLCPY
-size_t strlcpy(char *d, const char *s, size_t bufsize);
-#endif
-
-#ifndef HAVE_STRLCAT
-size_t strlcat(char *d, const char *s, size_t bufsize);
-#endif
-
-#ifndef HAVE_FTRUNCATE
-int ftruncate(int f,long l);
-#endif
-
-#ifndef HAVE_STRNDUP
-char *strndup(const char *s, size_t n);
-#endif
-
-#ifndef HAVE_STRNLEN
-size_t strnlen(const char *s, size_t n);
-#endif
-
-#ifndef HAVE_STRTOUL
-unsigned long strtoul(const char *nptr, char **endptr, int base);
-#endif
-
-#ifndef HAVE_SETENV
-int setenv(const char *name, const char *value, int overwrite); 
-#endif
-
 #if (defined(USE_SETRESUID)  !defined(HAVE_SETRESUID_DECL))
 /* stupid glibc */
 int setresuid(uid_t ruid, uid_t euid, uid_t suid);
@@ -1250,14 +1180,7 @@
 #if (defined(USE_SETRESUID)  !defined(HAVE_SETRESGID_DECL))
 int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
 #endif
-#ifndef HAVE_VASPRINTF_DECL
-int vasprintf(char **ptr, const char *format, va_list ap);
-#endif
 
-#ifdef REPLACE_GETPASS
-#define getpass(prompt) getsmbpass((prompt))
-#endif
-
 /*
  * Some older systems seem not to have MAXHOSTNAMELEN
  * defined.
@@ -1430,29 +1353,7 @@
 int d_printf(const char *, ...) PRINTF_ATTRIBUTE(1,2);
 /*PRINTFLIKE2 */
 int d_fprintf(FILE *f, const char *, ...) PRINTF_ATTRIBUTE(2,3);
-#ifndef HAVE_SNPRINTF_DECL
-/*PRINTFLIKE3 */
-int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
-#endif
-#ifndef HAVE_ASPRINTF_DECL
-/*PRINTFLIKE2 */
-int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
-#endif
 
-/* Fix prototype problem with non-C99 compliant snprintf implementations, esp
-   HPUX 11.  Don't change the sense of this #if statement.  Read the comments
-   in lib/snprint.c if you think you need to.  See also bugzilla bug 174. */
-
-#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
-#define snprintf smb_snprintf
-#define vsnprintf smb_vsnprintf
-
-/* PRINTFLIKE3 */
-int smb_snprintf(char *str,size_t count,const char *fmt,...);
-int smb_vsnprintf (char *str, size_t count, const char *fmt, va_list args);
-
-#endif
-
 /* PRINTFLIKE2 */
 void sys_adminlog(int priority, const char *format_str, ...) 
PRINTF_ATTRIBUTE(2,3);
 
@@ -1481,10 +1382,6 @@
 #endif
 #endif
 
-#ifndef HAVE_TIMEGM
-time_t timegm(struct tm *tm);
-#endif
-
 /*
  * Veritas File System.  Often in addition to native.
  * Quotas different.



Build status as of Tue Sep 19 00:00:02 2006

2006-09-18 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-09-18 
00:00:50.0 +
+++ /home/build/master/cache/broken_results.txt 2006-09-19 00:00:16.0 
+
@@ -1,21 +1,21 @@
-Build status as of Mon Sep 18 00:00:02 2006
+Build status as of Tue Sep 19 00:00:02 2006
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   43 7  0 
-distcc   43 7  0 
-ldb  41 6  0 
-libreplace   40 2  0 
-lorikeet-heimdal 1  0  0 
+ccache   42 6  0 
+distcc   42 7  0 
+ldb  40 7  0 
+libreplace   39 3  0 
+lorikeet-heimdal 0  0  0 
 ppp  17 0  0 
-rsync41 4  0 
-samba1  0  0 
+rsync40 5  0 
+samba0  0  0 
 samba-docs   0  0  0 
-samba4   42 12 1 
-samba_3_041 40 0 
-smb-build30 4  0 
-talloc   44 3  0 
-tdb  42 5  0 
+samba4   41 12 1 
+samba_3_040 19 1 
+smb-build29 4  0 
+talloc   43 3  0 
+tdb  41 6  0 
 


svn commit: samba r18654 - in branches/SAMBA_3_0/source: include lib libmsrpc passdb printing rpc_client rpc_parse rpc_server

2006-09-18 Thread jelmer
Author: jelmer
Date: 2006-09-19 00:12:11 + (Tue, 19 Sep 2006)
New Revision: 18654

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18654

Log:
Rename struct uuid = struct GUID for consistency.

Modified:
   branches/SAMBA_3_0/source/include/rpc_dce.h
   branches/SAMBA_3_0/source/include/rpc_ds.h
   branches/SAMBA_3_0/source/include/rpc_lsa.h
   branches/SAMBA_3_0/source/include/rpc_netlogon.h
   branches/SAMBA_3_0/source/include/rpc_secdes.h
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/lib/secace.c
   branches/SAMBA_3_0/source/lib/util_uuid.c
   branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c
   branches/SAMBA_3_0/source/passdb/secrets.c
   branches/SAMBA_3_0/source/printing/nt_printing.c
   branches/SAMBA_3_0/source/rpc_client/cli_lsarpc.c
   branches/SAMBA_3_0/source/rpc_client/cli_netlogon.c
   branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
   branches/SAMBA_3_0/source/rpc_parse/parse_net.c
   branches/SAMBA_3_0/source/rpc_server/srv_pipe.c
   branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/rpc_dce.h
===
--- branches/SAMBA_3_0/source/include/rpc_dce.h 2006-09-18 23:47:36 UTC (rev 
18653)
+++ branches/SAMBA_3_0/source/include/rpc_dce.h 2006-09-19 00:12:11 UTC (rev 
18654)
@@ -126,7 +126,7 @@
 
 /* RPC_IFACE */
 typedef struct rpc_iface_info {
-   struct uuid uuid;  /* 16 bytes of rpc interface identification */
+   struct GUID uuid;  /* 16 bytes of rpc interface identification */
uint32 version;/* the interface version number */
 } RPC_IFACE;
 

Modified: branches/SAMBA_3_0/source/include/rpc_ds.h
===
--- branches/SAMBA_3_0/source/include/rpc_ds.h  2006-09-18 23:47:36 UTC (rev 
18653)
+++ branches/SAMBA_3_0/source/include/rpc_ds.h  2006-09-19 00:12:11 UTC (rev 
18654)
@@ -68,7 +68,7 @@
uint32  dnsname_ptr;
uint32  forestname_ptr;

-   struct uuid domain_guid;
+   struct GUID domain_guid;

UNISTR2 netbios_domain;
 
@@ -114,7 +114,7 @@
uint32  trust_type;
uint32  trust_attributes;
uint32  sid_ptr;
-   struct uuid guid;
+   struct GUID guid;

UNISTR2 netbios_domain;
UNISTR2 dns_domain;
@@ -128,7 +128,7 @@
uint32  parent_index;
uint32  trust_type;
uint32  trust_attributes;
-   struct uuid guid;
+   struct GUID guid;

DOM_SID sid;
char *netbios_domain;

Modified: branches/SAMBA_3_0/source/include/rpc_lsa.h
===
--- branches/SAMBA_3_0/source/include/rpc_lsa.h 2006-09-18 23:47:36 UTC (rev 
18653)
+++ branches/SAMBA_3_0/source/include/rpc_lsa.h 2006-09-19 00:12:11 UTC (rev 
18654)
@@ -174,7 +174,7 @@
UNIHDR  hdr_dns_dom_name;
UNIHDR  hdr_forest_name;
 
-   struct uuid dom_guid; /* domain GUID */
+   struct GUID dom_guid; /* domain GUID */
 
UNISTR2 uni_nb_dom_name;
UNISTR2 uni_dns_dom_name;

Modified: branches/SAMBA_3_0/source/include/rpc_netlogon.h
===
--- branches/SAMBA_3_0/source/include/rpc_netlogon.h2006-09-18 23:47:36 UTC 
(rev 18653)
+++ branches/SAMBA_3_0/source/include/rpc_netlogon.h2006-09-19 00:12:11 UTC 
(rev 18654)
@@ -1031,9 +1031,9 @@
uint32 ptr_domain_name;
UNISTR2 uni_domain_name;
uint32 ptr_domain_guid;
-   struct uuid *domain_guid;
+   struct GUID *domain_guid;
uint32 ptr_site_guid;
-   struct uuid *site_guid;
+   struct GUID *site_guid;
uint32 flags;
 } NET_Q_DSR_GETDCNAME;
 
@@ -1044,7 +1044,7 @@
uint32 ptr_dc_address;
UNISTR2 uni_dc_address;
int32 dc_address_type;
-   struct uuid domain_guid;
+   struct GUID domain_guid;
uint32 ptr_domain_name;
UNISTR2 uni_domain_name;
uint32 ptr_forest_name;

Modified: branches/SAMBA_3_0/source/include/rpc_secdes.h
===
--- branches/SAMBA_3_0/source/include/rpc_secdes.h  2006-09-18 23:47:36 UTC 
(rev 18653)
+++ branches/SAMBA_3_0/source/include/rpc_secdes.h  2006-09-19 00:12:11 UTC 
(rev 18654)
@@ -89,8 +89,8 @@
 
/* this stuff may be present when type is _TYPE__OBJECT */
uint32  obj_flags; /* _ACE_OBJECT_ e.g present/inherited 
present etc */
-   struct uuid obj_guid;  /* object GUID */
-   struct uuid inh_guid;  /* inherited object GUID */  
+   struct GUID obj_guid;  /* object GUID */
+   struct GUID inh_guid;  /* inherited object GUID */  
 /* eof object stuff */
 
DOM_SID trustee;


svn commit: samba r18655 - in branches/SAMBA_4_0/source/libnet: .

2006-09-18 Thread mimir
Author: mimir
Date: 2006-09-19 00:23:55 + (Tue, 19 Sep 2006)
New Revision: 18655

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18655

Log:
add more fields and better handle the error case where fields
setting routine don't know how to do that (and user info level
is invalid).


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/userman.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/userman.c
===
--- branches/SAMBA_4_0/source/libnet/userman.c  2006-09-19 00:12:11 UTC (rev 
18654)
+++ branches/SAMBA_4_0/source/libnet/userman.c  2006-09-19 00:23:55 UTC (rev 
18655)
@@ -612,6 +612,39 @@
return s-change.fields;
}
 
+   } else if (s-change.fields  USERMOD_FIELD_LAST_LOGON) {
+   *level = 3;
+   
+   if (s-stage == USERMOD_QUERY) {
+   i-info3.last_logon = 
timeval_to_nttime(s-change.last_logon);
+   s-change.fields ^= USERMOD_FIELD_LAST_LOGON;
+   } else {
+   s-stage = USERMOD_QUERY;
+   return s-change.fields;
+   }
+   
+   } else if (s-change.fields  USERMOD_FIELD_LAST_LOGOFF) {
+   *level = 3;
+   
+   if (s-stage == USERMOD_QUERY) {
+   i-info3.last_logoff = 
timeval_to_nttime(s-change.last_logoff);
+   s-change.fields ^= USERMOD_FIELD_LAST_LOGOFF;
+   } else {
+   s-stage = USERMOD_QUERY;
+   return s-change.fields;
+   }
+
+   } else if (s-change.fields  USERMOD_FIELD_LAST_PASS_CHG) {
+   *level = 3;
+   
+   if (s-stage == USERMOD_QUERY) {
+   i-info3.last_password_change = 
timeval_to_nttime(s-change.last_password_change);
+   s-change.fields ^= USERMOD_FIELD_LAST_PASS_CHG;
+   } else {
+   s-stage = USERMOD_QUERY;
+   return s-change.fields;
+   }
+
} else if (s-change.fields  USERMOD_FIELD_LOGON_SCRIPT) {
*level = 11;
i-info11.logon_script.string = s-change.logon_script;
@@ -624,6 +657,28 @@
 
s-change.fields ^= USERMOD_FIELD_PROFILE_PATH;
 
+   } else if (s-change.fields  USERMOD_FIELD_HOME_DIRECTORY) {
+   *level = 3;
+   
+   if (s-stage == USERMOD_QUERY) {
+   i-info3.home_directory.string = 
s-change.home_directory;
+   s-change.fields ^= 
USERMOD_FIELD_HOME_DIRECTORY;
+   } else {
+   s-stage = USERMOD_QUERY;
+   return s-change.fields;
+   }
+
+   } else if (s-change.fields  USERMOD_FIELD_HOME_DRIVE) {
+   *level = 3;
+
+   if (s-stage == USERMOD_QUERY) {
+   i-info3.home_drive.string = 
s-change.home_drive;
+   s-change.fields ^= USERMOD_FIELD_HOME_DRIVE;
+   } else {
+   s-stage = USERMOD_QUERY;
+   return s-change.fields;
+   }
+
} else if (s-change.fields  USERMOD_FIELD_ACCT_EXPIRY) {
*level = 17;
i-info17.acct_expiry = 
timeval_to_nttime(s-change.acct_expiry);
@@ -638,7 +693,7 @@
}
}
 
-   /* We're going to be back here again soon unless all fields have been 
set */
+   /* We're going to be here back again soon unless all fields have been 
set */
if (s-change.fields) {
s-stage = USERMOD_OPEN;
} else {
@@ -656,7 +711,9 @@
 struct usermod_state *s)
 {
union samr_UserInfo *i = s-info;
-   uint16_t level;
+   /* set the level to invalid value, so that unless setfields routine 
+  gives it a valid value we report the error correctly */
+   uint16_t level = 27;
 
c-status = dcerpc_ndr_request_recv(s-req);
NT_STATUS_NOT_OK_RETURN(c-status);
@@ -664,6 +721,13 @@
/* prepare UserInfo level and data based on bitmask field */
s-change.fields = usermod_setfields(s, level, i);
 
+   if (level  26) {
+   /* apparently there's a field that the setfields routine
+  does not know how to set */
+   c-state = 

svn commit: samba r18656 - in branches/SAMBA_4_0/source/libnet: .

2006-09-18 Thread mimir
Author: mimir
Date: 2006-09-19 00:24:41 + (Tue, 19 Sep 2006)
New Revision: 18656

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18656

Log:
fix stupid mistake causing segfaults in torture test 
and also add one more field to be set.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/libnet_user.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_user.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_user.c  2006-09-19 00:23:55 UTC 
(rev 18655)
+++ branches/SAMBA_4_0/source/libnet/libnet_user.c  2006-09-19 00:24:41 UTC 
(rev 18656)
@@ -447,6 +447,7 @@
 struct libnet_ModifyUser *r,
 void (*monitor)(struct 
monitor_msg*))
 {
+   const uint16_t level = 21;
struct composite_context *c;
struct modify_user_state *s;
struct composite_context *prereq_ctx;
@@ -469,8 +470,9 @@
   continue_domain_open_modify, monitor);
if (prereq_ctx) return prereq_ctx;
 
-   s-user_mod.in.username  = r-in.user_name;
-   s-user_mod.in.domain_handle = ctx-samr.handle;
+   s-user_info.in.username  = r-in.user_name;
+   s-user_info.in.domain_handle = ctx-samr.handle;
+   s-user_info.in.level = level;
 
userinfo_req = libnet_rpc_userinfo_send(ctx-samr.pipe, s-user_info, 
monitor);
if (composite_nomem(userinfo_req, c)) return c;
@@ -579,6 +581,9 @@
/* last logoff change time */
SET_FIELD_NTTIME(r-in, user, mod, last_logoff, 
USERMOD_FIELD_LAST_LOGOFF);
 
+   /* last password change time */
+   SET_FIELD_NTTIME(r-in, user, mod, last_password_change, 
USERMOD_FIELD_LAST_PASS_CHG);
+
/* account expiry change */
SET_FIELD_NTTIME(r-in, user, mod, acct_expiry, 
USERMOD_FIELD_ACCT_EXPIRY);
 



svn commit: samba r18657 - in branches/SAMBA_4_0/source/libnet: .

2006-09-18 Thread mimir
Author: mimir
Date: 2006-09-19 00:25:55 + (Tue, 19 Sep 2006)
New Revision: 18657

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18657

Log:
handle the case where rpc call went fine, but the result
not necessariy did.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/userinfo.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/userinfo.c
===
--- branches/SAMBA_4_0/source/libnet/userinfo.c 2006-09-19 00:24:41 UTC (rev 
18656)
+++ branches/SAMBA_4_0/source/libnet/userinfo.c 2006-09-19 00:25:55 UTC (rev 
18657)
@@ -62,6 +62,9 @@
/* receive samr_Lookup reply */
c-status = dcerpc_ndr_request_recv(s-req);
NT_STATUS_NOT_OK_RETURN(c-status);
+   
+   /* there could be a problem with name resolving itself */
+   NT_STATUS_NOT_OK_RETURN(s-lookup.out.result);
 
/* have we actually got name resolved
   - we're looking for only one at the moment */



svn commit: samba r18658 - in branches/SAMBA_4_0/source/torture/libnet: .

2006-09-18 Thread mimir
Author: mimir
Date: 2006-09-19 00:27:49 + (Tue, 19 Sep 2006)
New Revision: 18658

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18658

Log:
make the test change fields sequentially each one in turn.
now to multiple changes...


rafal


Modified:
   branches/SAMBA_4_0/source/torture/libnet/libnet_user.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_user.c
===
--- branches/SAMBA_4_0/source/torture/libnet/libnet_user.c  2006-09-19 
00:25:55 UTC (rev 18657)
+++ branches/SAMBA_4_0/source/torture/libnet/libnet_user.c  2006-09-19 
00:27:49 UTC (rev 18658)
@@ -330,6 +330,7 @@
continue; \
}
 
+const int fields_num = 15;
 enum test_fields { none = 0, account_name, full_name, description, 
home_directory, home_drive,
   comment, logon_script, profile_path, acct_expiry, 
allow_password_change,
   force_password_change, last_logon, last_logoff, 
last_password_change };
@@ -337,7 +338,6 @@
 static void set_test_changes(TALLOC_CTX *mem_ctx, struct libnet_ModifyUser *r, 
int num_changes,
 char **user_name, enum test_fields req_change)
 {
-   const int num_fields = 14;
const char* logon_scripts[] = { start_login.cmd, login.bat, 
start.cmd };
const char* home_dirs[] = { srv\\home, homesrv\\home\\user, 
pdcsrv\\domain };
const char* home_drives[] = { H:, z:, I:, J:, n: };
@@ -349,10 +349,10 @@
 
printf(Fields to change: [);
 
-   for (i = 0; i  num_changes  i  num_fields; i++) {
+   for (i = 0; i  num_changes  i  fields_num; i++) {
const char *fldname;
 
-   testfld = (req_change == none) ? (random() % num_fields) : 
req_change;
+   testfld = (req_change == none) ? (random() % fields_num) : 
req_change;
 
/* get one in case we hit time field this time */
gettimeofday(now, NULL);
@@ -485,6 +485,7 @@
char *name;
struct libnet_context *ctx;
struct libnet_ModifyUser req;
+   int fld;
BOOL ret = True;
 
prep_mem_ctx = talloc_init(prepare test_deleteuser);
@@ -522,19 +523,41 @@
goto done;
}
 
-   ZERO_STRUCT(req);
-   req.in.domain_name = lp_workgroup();
-   req.in.user_name = name;
-   
-   printf(Testing change of a single field\n);
-   set_test_changes(mem_ctx, req, 1, name, none);
-   
-   status = libnet_ModifyUser(ctx, mem_ctx, req);
-   if (!NT_STATUS_IS_OK(status)) {
-   printf(libnet_ModifyUser call failed: %s\n, 
nt_errstr(status));
-   talloc_free(mem_ctx);
-   ret = False;
-   goto done;
+   printf(Testing change of all fields - each single one in turn\n);
+
+   for (fld = 1; fld  fields_num; fld++) {
+   ZERO_STRUCT(req);
+   req.in.domain_name = lp_workgroup();
+   req.in.user_name = name;
+
+   set_test_changes(mem_ctx, req, 1, name, fld);
+
+   status = libnet_ModifyUser(ctx, mem_ctx, req);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(libnet_ModifyUser call failed: %s\n, 
nt_errstr(status));
+   talloc_free(mem_ctx);
+   ret = False;
+   goto done;
+   }
+
+   if (fld == account_name) {
+   /* restore original testing username - it's useful when 
test fails
+  because it prevents from problems with recreating 
account */
+   ZERO_STRUCT(req);
+   req.in.domain_name = lp_workgroup();
+   req.in.user_name = name;
+   req.in.account_name = TEST_USERNAME;
+   
+   status = libnet_ModifyUser(ctx, mem_ctx, req);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(libnet_ModifyUser call failed: %s\n, 
nt_errstr(status));
+   talloc_free(mem_ctx);
+   ret = False;
+   goto done;
+   }
+   
+   name = TEST_USERNAME;
+   }
}
 
if (!test_cleanup(ctx-samr.pipe, mem_ctx, ctx-samr.handle, name)) {



svn commit: samba r18659 - in branches/SAMBA_3_0/source/include: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-19 00:29:41 + (Tue, 19 Sep 2006)
New Revision: 18659

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18659

Log:
restore BOOL, sorry:-)

libreplace only provides 'bool' not BOOL

metze

Modified:
   branches/SAMBA_3_0/source/include/includes.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/includes.h
===
--- branches/SAMBA_3_0/source/include/includes.h2006-09-19 00:27:49 UTC 
(rev 18658)
+++ branches/SAMBA_3_0/source/include/includes.h2006-09-19 00:29:41 UTC 
(rev 18659)
@@ -908,6 +908,11 @@
 #define MAX(a,b) ((a)(b)?(a):(b))
 #endif
 
+#ifndef _BOOL
+typedef int BOOL;
+#define _BOOL   /* So we don't typedef BOOL again in vfs.h */
+#endif
+
 #ifdef HAVE_BROKEN_GETGROUPS
 #define GID_T int
 #else



svn commit: samba r18660 - in branches/SAMBA_3_0/source/nmbd: .

2006-09-18 Thread jmcd
Author: jmcd
Date: 2006-09-19 00:39:21 + (Tue, 19 Sep 2006)
New Revision: 18660

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18660

Log:
Fix build, one uuid-GUID was missed.

Modified:
   branches/SAMBA_3_0/source/nmbd/nmbd_processlogon.c


Changeset:
Modified: branches/SAMBA_3_0/source/nmbd/nmbd_processlogon.c
===
--- branches/SAMBA_3_0/source/nmbd/nmbd_processlogon.c  2006-09-19 00:29:41 UTC 
(rev 18659)
+++ branches/SAMBA_3_0/source/nmbd/nmbd_processlogon.c  2006-09-19 00:39:21 UTC 
(rev 18660)
@@ -382,7 +382,7 @@
}
 #ifdef HAVE_ADS
else {
-   struct uuid domain_guid;
+   struct GUID domain_guid;
UUID_FLAT flat_guid;
pstring domain;
pstring hostname;



svn commit: samba r18661 - in branches: SAMBA_3_0/source/lib/socket_wrapper SAMBA_4_0/source/lib/socket_wrapper

2006-09-18 Thread vlendec
Author: vlendec
Date: 2006-09-19 00:55:40 + (Tue, 19 Sep 2006)
New Revision: 18661

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18661

Log:
C++ warnings
Modified:
   branches/SAMBA_3_0/source/lib/socket_wrapper/socket_wrapper.c
   branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/socket_wrapper/socket_wrapper.c
===
--- branches/SAMBA_3_0/source/lib/socket_wrapper/socket_wrapper.c   
2006-09-19 00:39:21 UTC (rev 18660)
+++ branches/SAMBA_3_0/source/lib/socket_wrapper/socket_wrapper.c   
2006-09-19 00:55:40 UTC (rev 18661)
@@ -473,7 +473,7 @@
 
if (fd == -1) return -1;
 
-   si = calloc(1, sizeof(struct socket_info));
+   si = (struct socket_info *)calloc(1, sizeof(struct socket_info));
 
si-family = family;
si-type = type;
@@ -518,7 +518,7 @@
return ret;
}
 
-   child_si = malloc(sizeof(struct socket_info));
+   child_si = (struct socket_info *)malloc(sizeof(struct socket_info));
memset(child_si, 0, sizeof(*child_si));
 
child_si-fd = fd;

Modified: branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c
===
--- branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c   
2006-09-19 00:39:21 UTC (rev 18660)
+++ branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c   
2006-09-19 00:55:40 UTC (rev 18661)
@@ -473,7 +473,7 @@
 
if (fd == -1) return -1;
 
-   si = calloc(1, sizeof(struct socket_info));
+   si = (struct socket_info *)calloc(1, sizeof(struct socket_info));
 
si-family = family;
si-type = type;
@@ -518,7 +518,7 @@
return ret;
}
 
-   child_si = malloc(sizeof(struct socket_info));
+   child_si = (struct socket_info *)malloc(sizeof(struct socket_info));
memset(child_si, 0, sizeof(*child_si));
 
child_si-fd = fd;



svn commit: samba r18663 - in branches/SAMBA_3_0/source: include libads

2006-09-18 Thread jra
Author: jra
Date: 2006-09-19 01:07:40 + (Tue, 19 Sep 2006)
New Revision: 18663

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18663

Log:
Fix one more uuid - GUID.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/ads_protos.h
   branches/SAMBA_3_0/source/libads/ldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/ads_protos.h
===
--- branches/SAMBA_3_0/source/include/ads_protos.h  2006-09-19 00:56:02 UTC 
(rev 18662)
+++ branches/SAMBA_3_0/source/include/ads_protos.h  2006-09-19 01:07:40 UTC 
(rev 18663)
@@ -20,7 +20,7 @@
  BOOL *more_strings);
 BOOL ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
 uint32 *v);
-BOOL ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct uuid *guid);
+BOOL ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid);
 BOOL ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
  DOM_SID *sid);
 int ads_pull_sids(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,

Modified: branches/SAMBA_3_0/source/libads/ldap.c
===
--- branches/SAMBA_3_0/source/libads/ldap.c 2006-09-19 00:56:02 UTC (rev 
18662)
+++ branches/SAMBA_3_0/source/libads/ldap.c 2006-09-19 01:07:40 UTC (rev 
18663)
@@ -2089,7 +2089,7 @@
  * @param guid 37-byte area to receive text guid
  * @return boolean indicating success
  **/
- BOOL ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct uuid *guid)
+ BOOL ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid)
 {
char **values;
UUID_FLAT flat_guid;



svn commit: samba r18664 - in branches/SAMBA_3_0/source/include: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-19 01:21:03 + (Tue, 19 Sep 2006)
New Revision: 18664

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18664

Log:
this stuff is included from libreplace

metze

Modified:
   branches/SAMBA_3_0/source/include/includes.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/includes.h
===
--- branches/SAMBA_3_0/source/include/includes.h2006-09-19 01:07:40 UTC 
(rev 18663)
+++ branches/SAMBA_3_0/source/include/includes.h2006-09-19 01:21:03 UTC 
(rev 18664)
@@ -118,278 +118,6 @@
 #include system/time.h
 #include system/wait.h
 
-#include sys/types.h
-
-#ifdef HAVE_STDINT_H
-#include stdint.h
-#endif
-
-#if HAVE_INTTYPES_H
-#include inttypes.h
-#endif
-
-#ifdef TIME_WITH_SYS_TIME
-#include sys/time.h
-#include time.h
-#else
-#ifdef HAVE_SYS_TIME_H
-#include sys/time.h
-#else
-#include time.h
-#endif
-#endif
-
-#ifdef HAVE_SYS_RESOURCE_H
-#include sys/resource.h
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include unistd.h
-#endif
-
-#include stdio.h
-#include stddef.h
-
-#ifdef HAVE_SYS_PARAM_H
-#include sys/param.h
-#endif
-
-#ifdef HAVE_STDLIB_H
-#include stdlib.h
-#endif
-
-#ifdef HAVE_SYS_SOCKET_H
-#include sys/socket.h
-#endif
-
-#ifdef HAVE_UNIXSOCKET
-#include sys/un.h
-#endif
-
-#ifdef HAVE_SYS_SYSCALL_H
-#include sys/syscall.h
-#elif HAVE_SYSCALL_H
-#include syscall.h
-#endif
-
-#ifdef HAVE_STRING_H
-#include string.h
-#endif
-
-#ifdef HAVE_STRINGS_H
-#include strings.h
-#endif
-
-#ifdef HAVE_MEMORY_H
-#include memory.h
-#endif
-
-#ifdef HAVE_MALLOC_H
-#include malloc.h
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include fcntl.h
-#else
-#ifdef HAVE_SYS_FCNTL_H
-#include sys/fcntl.h
-#endif
-#endif
-
-#include sys/stat.h
-
-#ifdef HAVE_LIMITS_H
-#include limits.h
-#endif
-
-#ifdef HAVE_SYS_IOCTL_H
-#include sys/ioctl.h
-#endif
-
-#ifdef HAVE_SYS_FILIO_H
-#include sys/filio.h
-#endif
-
-#include signal.h
-
-#ifdef HAVE_SYS_WAIT_H
-#include sys/wait.h
-#endif
-#ifdef HAVE_CTYPE_H
-#include ctype.h
-#endif
-#ifdef HAVE_GRP_H
-#include grp.h
-#endif
-#ifdef HAVE_SYS_PRIV_H
-#include sys/priv.h
-#endif
-#ifdef HAVE_SYS_ID_H
-#include sys/id.h
-#endif
-
-#include errno.h
-
-#ifdef HAVE_UTIME_H
-#include utime.h
-#endif
-
-#ifdef HAVE_SYS_SELECT_H
-#include sys/select.h
-#endif
-
-#ifdef HAVE_SYS_MODE_H
-/* apparently AIX needs this for S_ISLNK */
-#ifndef S_ISLNK
-#include sys/mode.h
-#endif
-#endif
-
-#ifdef HAVE_GLOB_H
-#include glob.h
-#endif
-
-#include pwd.h
-
-#ifdef HAVE_STDARG_H
-#include stdarg.h
-#else
-#include varargs.h
-#endif
-
-#include netinet/in.h
-#include arpa/inet.h
-#include netdb.h
-
-#ifdef HAVE_SYSLOG_H
-#include syslog.h
-#else
-#ifdef HAVE_SYS_SYSLOG_H
-#include sys/syslog.h
-#endif
-#endif
-
-#include sys/file.h
-
-#ifdef HAVE_NETINET_TCP_H
-#include netinet/tcp.h
-#endif
-
-/*
- * The next three defines are needed to access the IPTOS_* options
- * on some systems.
- */
-
-#ifdef HAVE_NETINET_IN_SYSTM_H
-#include netinet/in_systm.h
-#endif
-
-#ifdef HAVE_NETINET_IN_IP_H
-#include netinet/in_ip.h
-#endif
-
-#ifdef HAVE_NETINET_IP_H
-#include netinet/ip.h
-#endif
-
-#if defined(HAVE_TERMIOS_H)
-/* POSIX terminal handling. */
-#include termios.h
-#elif defined(HAVE_TERMIO_H)
-/* Older SYSV terminal handling - don't use if we can avoid it. */
-#include termio.h
-#elif defined(HAVE_SYS_TERMIO_H)
-/* Older SYSV terminal handling - don't use if we can avoid it. */
-#include sys/termio.h
-#endif
-
-#if HAVE_DIRENT_H
-# include dirent.h
-# define NAMLEN(dirent) strlen((dirent)-d_name)
-#else
-# define dirent direct
-# define NAMLEN(dirent) (dirent)-d_namlen
-# if HAVE_SYS_NDIR_H
-#  include sys/ndir.h
-# endif
-# if HAVE_SYS_DIR_H
-#  include sys/dir.h
-# endif
-# if HAVE_NDIR_H
-#  include ndir.h
-# endif
-#endif
-
-#ifdef HAVE_SYS_MMAN_H
-#include sys/mman.h
-#endif
-
-#ifdef HAVE_NET_IF_H
-#include net/if.h
-#endif
-
-
-#ifdef HAVE_SYS_MOUNT_H
-#include sys/mount.h
-#endif
-
-#ifdef HAVE_SYS_VFS_H
-#include sys/vfs.h
-#endif
-
-#ifdef HAVE_SYS_ACL_H
-#include sys/acl.h
-#endif
-
-#ifdef HAVE_SYS_FS_S5PARAM_H 
-#include sys/fs/s5param.h
-#endif
-
-#if defined (HAVE_SYS_FILSYS_H)  !defined (_CRAY)
-#include sys/filsys.h 
-#endif
-
-#ifdef HAVE_SYS_STATFS_H
-# include sys/statfs.h
-#endif
-
-#ifdef HAVE_DUSTAT_H  
-#include sys/dustat.h
-#endif
-
-#ifdef HAVE_SYS_STATVFS_H  
-#include sys/statvfs.h
-#endif
-
-#ifdef HAVE_SHADOW_H
-/*
- * HP-UX 11.X has TCP_NODELAY and TCP_MAXSEG defined in netinet/tcp.h which
- * was included above.  However rpc/rpc.h includes sys/xti.h which defines
- * them again without checking if they already exsist.  This generates
- * two Redefinition of macro warnings for every single .c file that is
- * compiled.
- */
-#if defined(HPUX)  defined(TCP_NODELAY)
-#undef TCP_NODELAY
-#endif
-#if defined(HPUX)  defined(TCP_MAXSEG)
-#undef TCP_MAXSEG
-#endif
-#include shadow.h
-#endif
-
-#ifdef HAVE_GETPWANAM
-#include sys/label.h

svn commit: samba r18665 - in branches/SAMBA_3_0/source/auth: .

2006-09-18 Thread vlendec
Author: vlendec
Date: 2006-09-19 01:25:52 + (Tue, 19 Sep 2006)
New Revision: 18665

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18665

Log:
Remove two type-punned warnings
Modified:
   branches/SAMBA_3_0/source/auth/auth_script.c
   branches/SAMBA_3_0/source/auth/auth_winbind.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth_script.c
===
--- branches/SAMBA_3_0/source/auth/auth_script.c2006-09-19 01:21:03 UTC 
(rev 18664)
+++ branches/SAMBA_3_0/source/auth/auth_script.c2006-09-19 01:25:52 UTC 
(rev 18665)
@@ -132,10 +132,11 @@
if (param  *param) {
/* we load the 'fallback' module - if script isn't here, call 
this
   module */
-   if (!load_auth_module(auth_context, param, (auth_methods 
**)(*auth_method)-private_data)) {
+   auth_methods *priv;
+   if (!load_auth_module(auth_context, param, priv)) {
return NT_STATUS_UNSUCCESSFUL;
}
-   
+   (*auth_method)-private_data = (void *)priv;
}
return NT_STATUS_OK;
 }

Modified: branches/SAMBA_3_0/source/auth/auth_winbind.c
===
--- branches/SAMBA_3_0/source/auth/auth_winbind.c   2006-09-19 01:21:03 UTC 
(rev 18664)
+++ branches/SAMBA_3_0/source/auth/auth_winbind.c   2006-09-19 01:25:52 UTC 
(rev 18665)
@@ -158,10 +158,11 @@
if (param  *param) {
/* we load the 'fallback' module - if winbind isn't here, call 
this
   module */
-   if (!load_auth_module(auth_context, param, (auth_methods 
**)(*auth_method)-private_data)) {
+   auth_methods *priv;
+   if (!load_auth_module(auth_context, param, priv)) {
return NT_STATUS_UNSUCCESSFUL;
}
-   
+   (*auth_method)-private_data = (void *)priv;
}
return NT_STATUS_OK;
 }



svn commit: samba r18666 - in branches/SAMBA_3_0/source: . librpc/gen_ndr librpc/idl

2006-09-18 Thread jerry
Author: jerry
Date: 2006-09-19 01:27:20 + (Tue, 19 Sep 2006)
New Revision: 18666

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18666

Log:
checking in generated netlogon files
Added:
   branches/SAMBA_3_0/source/librpc/gen_ndr/cli_netlogon.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/cli_netlogon.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_netlogon.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_netlogon.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/netlogon.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_netlogon.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_netlogon.h
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/librpc/idl/netlogon.idl


Changeset:
Sorry, the patch is too large (18786 lines) to include; please use WebSVN to 
see it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18666


svn commit: samba r18667 - in branches/SAMBA_3_0/source: librpc/ndr nsswitch

2006-09-18 Thread vlendec
Author: vlendec
Date: 2006-09-19 01:28:25 + (Tue, 19 Sep 2006)
New Revision: 18667

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18667

Log:
Two C++ warnings
Modified:
   branches/SAMBA_3_0/source/librpc/ndr/sid.c
   branches/SAMBA_3_0/source/nsswitch/pam_winbind.c


Changeset:
Modified: branches/SAMBA_3_0/source/librpc/ndr/sid.c
===
--- branches/SAMBA_3_0/source/librpc/ndr/sid.c  2006-09-19 01:27:20 UTC (rev 
18666)
+++ branches/SAMBA_3_0/source/librpc/ndr/sid.c  2006-09-19 01:28:25 UTC (rev 
18667)
@@ -73,7 +73,7 @@
}
 
maxlen = sid-num_auths * 11 + 25;
-   ret = talloc_size(mem_ctx, maxlen);
+   ret = (char *)talloc_size(mem_ctx, maxlen);
if (!ret) return talloc_strdup(mem_ctx, (SID ERR));
 
ia = (sid-id_auth[5]) +

Modified: branches/SAMBA_3_0/source/nsswitch/pam_winbind.c
===
--- branches/SAMBA_3_0/source/nsswitch/pam_winbind.c2006-09-19 01:27:20 UTC 
(rev 18666)
+++ branches/SAMBA_3_0/source/nsswitch/pam_winbind.c2006-09-19 01:28:25 UTC 
(rev 18667)
@@ -575,7 +575,7 @@
/* 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;
+   *user_ret = (char *)response.extra_data.data;
}
 
return ret;



svn commit: samba r18668 - in branches/SAMBA_4_0/source/torture/rpc: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-19 01:34:53 + (Tue, 19 Sep 2006)
New Revision: 18668

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18668

Log:
fix ref pointer related bugs, we should watch the compiler warnings!
only cc on us4 bailed out...

metze
Modified:
   branches/SAMBA_4_0/source/torture/rpc/remact.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/remact.c
===
--- branches/SAMBA_4_0/source/torture/rpc/remact.c  2006-09-19 01:28:25 UTC 
(rev 18667)
+++ branches/SAMBA_4_0/source/torture/rpc/remact.c  2006-09-19 01:34:53 UTC 
(rev 18668)
@@ -58,8 +58,8 @@
return 0;
}
 
-   if(!W_ERROR_IS_OK(r.out.hr)) {
-   printf(RemoteActivation: %s\n, win_errstr(r.out.hr));
+   if(!W_ERROR_IS_OK(*r.out.hr)) {
+   printf(RemoteActivation: %s\n, win_errstr(*r.out.hr));
return 0;
}
 
@@ -83,8 +83,8 @@
return 0;
}
 
-   if(!W_ERROR_IS_OK(r.out.hr)) {
-   printf(RemoteActivation(GetClassObject): %s\n, 
win_errstr(r.out.hr));
+   if(!W_ERROR_IS_OK(*r.out.hr)) {
+   printf(RemoteActivation(GetClassObject): %s\n, 
win_errstr(*r.out.hr));
return 0;
}
 



svn commit: samba r18670 - in branches/SAMBA_3_0/source/libads: .

2006-09-18 Thread gd
Author: gd
Date: 2006-09-19 02:04:11 + (Tue, 19 Sep 2006)
New Revision: 18670

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18670

Log:
Fix memleaks.

Guenther

Modified:
   branches/SAMBA_3_0/source/libads/ldap_schema.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/ldap_schema.c
===
--- branches/SAMBA_3_0/source/libads/ldap_schema.c  2006-09-19 02:03:15 UTC 
(rev 18669)
+++ branches/SAMBA_3_0/source/libads/ldap_schema.c  2006-09-19 02:04:11 UTC 
(rev 18670)
@@ -165,10 +165,12 @@
}
 
if ( (schema = ads_pull_string(ads, mem_ctx, res, 
schemaNamingContext)) == NULL ) {
+   ads_msgfree(ads, res);
return ADS_ERROR(LDAP_NO_RESULTS_RETURNED);
}
 
if ( (*schema_path = talloc_strdup(mem_ctx, schema)) == NULL ) {
+   ads_msgfree(ads, res);
return ADS_ERROR(LDAP_NO_MEMORY);
}
 



svn commit: samba r18671 - in branches/SAMBA_3_0/source/lib/replace: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-19 03:04:57 + (Tue, 19 Sep 2006)
New Revision: 18671

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18671

Log:
try to fix the build on solaris 10 and maybe some other hosts

we need to define 'BOOL_DEFINED' to make sure it didn't get redefined
by rpcsvc/yp_prot.h

metze

Modified:
   branches/SAMBA_3_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-19 02:04:11 UTC 
(rev 18670)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-19 03:04:57 UTC 
(rev 18671)
@@ -325,6 +325,7 @@
 #define bool _Bool
 #else
 #define __bool_true_false_are_defined
+#define BOOL_DEFINED /* needed for rpcsvc/yp_prot.h not doing a redefine */
 typedef int bool;
 #endif
 #endif



svn commit: samba r18672 - in branches/SAMBA_3_0/source/lib/replace: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-19 03:29:44 + (Tue, 19 Sep 2006)
New Revision: 18672

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18672

Log:
fix the build on Tru64

metze

Modified:
   branches/SAMBA_3_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-19 03:04:57 UTC 
(rev 18671)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-19 03:29:44 UTC 
(rev 18672)
@@ -325,7 +325,14 @@
 #define bool _Bool
 #else
 #define __bool_true_false_are_defined
-#define BOOL_DEFINED /* needed for rpcsvc/yp_prot.h not doing a redefine */
+/*
+ * to prevent rpcsvc/yp_prot.h from doing a redefine of 'bool'
+ *
+ * IRIX, HPUX, MacOS 10 and Solaris need BOOL_DEFINED
+ * Tru64 needs _BOOL_EXISTS
+ */
+#define BOOL_DEFINED
+#define _BOOL_EXISTS
 typedef int bool;
 #endif
 #endif



svn commit: samba r18673 - in branches/SAMBA_3_0/source/lib/replace: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-19 03:38:35 + (Tue, 19 Sep 2006)
New Revision: 18673

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18673

Log:
define the macros even if we don't define bool ourself

metze

Modified:
   branches/SAMBA_3_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-19 03:29:44 UTC 
(rev 18672)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-19 03:38:35 UTC 
(rev 18673)
@@ -324,17 +324,25 @@
 #ifdef HAVE__Bool
 #define bool _Bool
 #else
-#define __bool_true_false_are_defined
+typedef int bool;
+#endif
+#endif
+
 /*
  * to prevent rpcsvc/yp_prot.h from doing a redefine of 'bool'
  *
  * IRIX, HPUX, MacOS 10 and Solaris need BOOL_DEFINED
  * Tru64 needs _BOOL_EXISTS
  */
+#ifndef BOOL_DEFINED
 #define BOOL_DEFINED
+#endif
+#ifndef _BOOL_EXISTS
 #define _BOOL_EXISTS
-typedef int bool;
 #endif
+
+#ifndef __bool_true_false_are_defined
+#define __bool_true_false_are_defined
 #endif
 
 #ifndef true



svn commit: samba r18674 - in branches/SAMBA_4_0/source/lib/replace: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-19 03:48:31 + (Tue, 19 Sep 2006)
New Revision: 18674

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18674

Log:
merge from samba3,

PRINTF_ATTRIBUTE seems to not work with gcc 3.0

metze
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-19 03:38:35 UTC 
(rev 18673)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2006-09-19 03:48:31 UTC 
(rev 18674)
@@ -207,7 +207,7 @@
 
 
 #ifndef PRINTF_ATTRIBUTE
-#if __GNUC__ = 3
+#if (__GNUC__ = 3)  (__GNUC_MINOR__ = 1 )
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
  * the parameter containing the format, and a2 the index of the first
  * argument. Note that some gcc 2.x versions don't handle this



svn commit: samba r18675 - in branches/SAMBA_4_0/source/lib/replace: .

2006-09-18 Thread metze
Author: metze
Date: 2006-09-19 03:51:45 + (Tue, 19 Sep 2006)
New Revision: 18675

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=18675

Log:
merge from samba3:

we need to define the macros the indicate we have bool
even if we have not defining bool ourself

metze
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-19 03:48:31 UTC 
(rev 18674)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2006-09-19 03:51:45 UTC 
(rev 18675)
@@ -324,11 +324,27 @@
 #ifdef HAVE__Bool
 #define bool _Bool
 #else
-#define __bool_true_false_are_defined
 typedef int bool;
 #endif
 #endif
 
+/*
+ * to prevent rpcsvc/yp_prot.h from doing a redefine of 'bool'
+ *
+ * IRIX, HPUX, MacOS 10 and Solaris need BOOL_DEFINED
+ * Tru64 needs _BOOL_EXISTS
+ */
+#ifndef BOOL_DEFINED
+#define BOOL_DEFINED
+#endif
+#ifndef _BOOL_EXISTS
+#define _BOOL_EXISTS
+#endif
+
+#ifndef __bool_true_false_are_defined
+#define __bool_true_false_are_defined
+#endif
+
 #ifndef true
 #define true (1)
 #endif