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

2006-10-01 Thread metze
Author: metze
Date: 2006-10-01 17:56:39 + (Sun, 01 Oct 2006)
New Revision: 19015

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

Log:
we don't need talloc_* in proto.h

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-30 21:30:24 UTC (rev 
19014)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-10-01 17:56:39 UTC (rev 
19015)
@@ -223,7 +223,7 @@
 
 TALLOC_OBJ = lib/talloc/talloc.o
 
-LIB_WITHOUT_PROTO_OBJ = @LIBREPLACE_OBJS@ @SOCKET_WRAPPER_OBJS@
+LIB_WITHOUT_PROTO_OBJ = @LIBREPLACE_OBJS@ @SOCKET_WRAPPER_OBJS@ $(TALLOC_OBJ)
 
 LIB_WITH_PROTO_OBJ = $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
  lib/interface.o lib/md4.o \
@@ -245,7 +245,7 @@
  lib/adt_tree.o lib/gencache.o $(TDB_OBJ) \
  lib/module.o lib/events.o lib/ldap_escape.o @CHARSET_STATIC@ \
  lib/secdesc.o lib/util_seaccess.o lib/secace.o lib/secacl.o \
- libads/krb5_errs.o lib/system_smbd.o lib/audit.o $(TALLOC_OBJ)
+ libads/krb5_errs.o lib/system_smbd.o lib/audit.o
 
 LIB_OBJ = $(LIB_WITHOUT_PROTO_OBJ) $(LIB_WITH_PROTO_OBJ)
 



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

2006-10-01 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

   }
 + if (fstat(d-fd, sb)  0) {
 +close(d-fd);
 +free(d);
 +return NULL;
 +}
 +if (!S_ISDIR(sb.st_mode)) {
 +close(d-fd);
 +free(d);   
 +errno = ENOTDIR;
 +return NULL;
 +}

Yes, please! (but first cleanup the whitespaces into tabs:-)

We should also add a test for this in the libreplace testsuite
to make sure that every opendir() gives this error.

metze
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFIAVHm70gjA5TCD8RAvMQAKCW4MrEabRdSldOh8VtkiWCX78x8ACdEoez
bqSBIscrXIOu/lgILFE5YMw=
=krL4
-END PGP SIGNATURE-


svn commit: linux-cifs-client r87 - in branches: linux-2.6-cifs-git-devel/fs/cifs linux-converged-for-old-kernels/fs/cifs

2006-10-01 Thread sfrench
Author: sfrench
Date: 2006-10-01 19:28:30 + (Sun, 01 Oct 2006)
New Revision: 87

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=87

Log:
merge with git

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsglob.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/cifs_fs_sb.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/connect.c
   branches/linux-converged-for-old-kernels/fs/cifs/dir.c
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/link.c
   branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
   branches/linux-converged-for-old-kernels/fs/cifs/sess.c
   branches/linux-converged-for-old-kernels/fs/cifs/xattr.c


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


svn commit: linux-cifs-client r88 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-10-01 Thread sfrench
Author: sfrench
Date: 2006-10-01 19:55:14 + (Sun, 01 Oct 2006)
New Revision: 88

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=88

Log:
address space ops do have to be const after all

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-10-01 
19:28:30 UTC (rev 87)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-10-01 
19:55:14 UTC (rev 88)
@@ -61,8 +61,8 @@
 #endif
 #endif
 
-extern struct address_space_operations cifs_addr_ops;
-extern struct address_space_operations cifs_addr_ops_smallbuf;
+extern const struct address_space_operations cifs_addr_ops;
+extern const struct address_space_operations cifs_addr_ops_smallbuf;
 
 /* Functions related to super block operations */
 extern struct super_operations cifs_super_ops;



svn commit: linux-cifs-client r89 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-10-01 Thread sfrench
Author: sfrench
Date: 2006-10-01 19:57:43 + (Sun, 01 Oct 2006)
New Revision: 89

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=89

Log:
Make search resume work to os2

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/readdir.c  2006-10-01 
19:55:14 UTC (rev 88)
+++ branches/linux-converged-for-old-kernels/fs/cifs/readdir.c  2006-10-01 
19:57:43 UTC (rev 89)
@@ -954,6 +954,7 @@
filename = pFindData-FileName[0];
/* one byte length, no name conversion */
len = (unsigned int)pFindData-FileNameLength;
+   cifsFile-srch_inf.resume_key = pFindData-ResumeKey;
} else {
cFYI(1,(Unknown findfirst level %d,level));
return -EINVAL;



svn commit: linux-cifs-client r90 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2006-10-01 Thread sfrench
Author: sfrench
Date: 2006-10-01 19:58:24 + (Sun, 01 Oct 2006)
New Revision: 90

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=90

Log:
Make FindNext work to os/2 (fill in resume key properly)

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c


Changeset:
Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c 2006-10-01 19:57:43 UTC 
(rev 89)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c 2006-10-01 19:58:24 UTC 
(rev 90)
@@ -946,6 +946,7 @@
filename = pFindData-FileName[0];
/* one byte length, no name conversion */
len = (unsigned int)pFindData-FileNameLength;
+   cifsFile-srch_inf.resume_key = pFindData-ResumeKey;
} else {
cFYI(1,(Unknown findfirst level %d,level));
return -EINVAL;



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

2006-10-01 Thread vlendec
Author: vlendec
Date: 2006-10-01 20:43:16 + (Sun, 01 Oct 2006)
New Revision: 19016

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

Log:
As per Samba4 coding standards, turn tabs into spaces
Modified:
   branches/SAMBA_3_0/source/lib/replace/repdir_getdents.c
   branches/SAMBA_3_0/source/lib/replace/repdir_getdirentries.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/repdir_getdents.c
===
--- branches/SAMBA_3_0/source/lib/replace/repdir_getdents.c 2006-10-01 
17:56:39 UTC (rev 19015)
+++ branches/SAMBA_3_0/source/lib/replace/repdir_getdents.c 2006-10-01 
20:43:16 UTC (rev 19016)
@@ -80,16 +80,16 @@
return NULL;
}
if (fstat(d-fd, sb)  0) {
-close(d-fd);
-free(d);
-return NULL;
-}
-if (!S_ISDIR(sb.st_mode)) {
-close(d-fd);
-free(d);   
-errno = ENOTDIR;
-return NULL;
-}
+   close(d-fd);
+   free(d);
+   return NULL;
+   }
+   if (!S_ISDIR(sb.st_mode)) {
+   close(d-fd);
+   free(d);   
+   errno = ENOTDIR;
+   return NULL;
+   }
d-ofs = 0;
d-seekpos = 0;
d-nbytes = 0;

Modified: branches/SAMBA_3_0/source/lib/replace/repdir_getdirentries.c
===
--- branches/SAMBA_3_0/source/lib/replace/repdir_getdirentries.c
2006-10-01 17:56:39 UTC (rev 19015)
+++ branches/SAMBA_3_0/source/lib/replace/repdir_getdirentries.c
2006-10-01 20:43:16 UTC (rev 19016)
@@ -82,16 +82,16 @@
return NULL;
}
if (fstat(d-fd, sb)  0) {
-close(d-fd);
-free(d);
-return NULL;
-}
-if (!S_ISDIR(sb.st_mode)) {
-close(d-fd);
-free(d);   
-errno = ENOTDIR;
-return NULL;
-}
+   close(d-fd);
+   free(d);
+   return NULL;
+   }
+   if (!S_ISDIR(sb.st_mode)) {
+   close(d-fd);
+   free(d);   
+   errno = ENOTDIR;
+   return NULL;
+   }
d-ofs = 0;
d-seekpos = 0;
d-nbytes = 0;



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

2006-10-01 Thread vlendec
Author: vlendec
Date: 2006-10-01 20:45:46 + (Sun, 01 Oct 2006)
New Revision: 19017

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

Log:
Merge from Samba3:

Attempt to fix the BSD RAW-CHKPATH failures: In Samba3 we rely on opendir
returning ENOTDIR when the file opened is not a directory. Can we merge this
back into Samba4?

This includes the tabs-spaces fix requested by Stefan.

Volker

Modified:
   branches/SAMBA_4_0/source/lib/replace/repdir_getdents.c
   branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/repdir_getdents.c
===
--- branches/SAMBA_4_0/source/lib/replace/repdir_getdents.c 2006-10-01 
20:43:16 UTC (rev 19016)
+++ branches/SAMBA_4_0/source/lib/replace/repdir_getdents.c 2006-10-01 
20:45:46 UTC (rev 19017)
@@ -68,6 +68,7 @@
 DIR *opendir(const char *dname)
 {
struct dir_buf *d;
+   struct stat sb;
d = malloc(sizeof(*d));
if (d == NULL) {
errno = ENOMEM;
@@ -78,6 +79,17 @@
free(d);
return NULL;
}
+   if (fstat(d-fd, sb)  0) {
+   close(d-fd);
+   free(d);
+   return NULL;
+   }
+   if (!S_ISDIR(sb.st_mode)) {
+   close(d-fd);
+   free(d);   
+   errno = ENOTDIR;
+   return NULL;
+   }
d-ofs = 0;
d-seekpos = 0;
d-nbytes = 0;

Modified: branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c
===
--- branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c
2006-10-01 20:43:16 UTC (rev 19016)
+++ branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c
2006-10-01 20:45:46 UTC (rev 19017)
@@ -70,6 +70,7 @@
 DIR *opendir(const char *dname)
 {
struct dir_buf *d;
+   struct stat sb;
d = malloc(sizeof(*d));
if (d == NULL) {
errno = ENOMEM;
@@ -80,6 +81,17 @@
free(d);
return NULL;
}
+   if (fstat(d-fd, sb)  0) {
+   close(d-fd);
+   free(d);
+   return NULL;
+   }
+   if (!S_ISDIR(sb.st_mode)) {
+   close(d-fd);
+   free(d);   
+   errno = ENOTDIR;
+   return NULL;
+   }
d-ofs = 0;
d-seekpos = 0;
d-nbytes = 0;



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

2006-10-01 Thread tridge
Volker,

  As per Samba4 coding standards, turn tabs into spaces

oh? Did someone add that to the coding standards?

I actually much prefer using tabs instead of spaces. In prog_guide.txt
I specified using the Linux kernel CodingStyle doc, as I was too lazy
to write my own, and I like the kernel one. It specifies tabs :)

Not a big issue of course  :-)

Cheers, Tridge


svn commit: samba r19018 - in branches/SAMBA_3_0_RELEASE: . examples/misc source source/auth source/groupdb source/include source/lib source/libads source/libsmb source/nsswitch source/passdb source/r

2006-10-01 Thread jerry
Author: jerry
Date: 2006-10-01 21:20:14 + (Sun, 01 Oct 2006)
New Revision: 19018

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

Log:
staging for a 3.0.23d on Tuesday (I think we have sufficient changes to warrant 
one)
Modified:
   branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
   branches/SAMBA_3_0_RELEASE/examples/misc/adssearch.pl
   branches/SAMBA_3_0_RELEASE/source/Makefile.in
   branches/SAMBA_3_0_RELEASE/source/VERSION
   branches/SAMBA_3_0_RELEASE/source/auth/auth_util.c
   branches/SAMBA_3_0_RELEASE/source/configure.in
   branches/SAMBA_3_0_RELEASE/source/groupdb/mapping.c
   branches/SAMBA_3_0_RELEASE/source/include/includes.h
   branches/SAMBA_3_0_RELEASE/source/lib/account_pol.c
   branches/SAMBA_3_0_RELEASE/source/lib/util.c
   branches/SAMBA_3_0_RELEASE/source/lib/util_sec.c
   branches/SAMBA_3_0_RELEASE/source/libads/cldap.c
   branches/SAMBA_3_0_RELEASE/source/libads/ldap.c
   branches/SAMBA_3_0_RELEASE/source/libads/ldap_schema.c
   branches/SAMBA_3_0_RELEASE/source/libads/ldap_utils.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/ntlmssp.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/smbencrypt.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_async.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_group.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_nss.h
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_pam.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_sid.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_user.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_util.c
   branches/SAMBA_3_0_RELEASE/source/passdb/lookup_sid.c
   branches/SAMBA_3_0_RELEASE/source/passdb/pdb_get_set.c
   branches/SAMBA_3_0_RELEASE/source/passdb/pdb_interface.c
   branches/SAMBA_3_0_RELEASE/source/passdb/pdb_ldap.c
   branches/SAMBA_3_0_RELEASE/source/passdb/pdb_smbpasswd.c
   branches/SAMBA_3_0_RELEASE/source/passdb/pdb_tdb.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_samr.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_samr_util.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_spoolss_nt.c
   branches/SAMBA_3_0_RELEASE/source/smbd/dir.c
   branches/SAMBA_3_0_RELEASE/source/smbd/sesssetup.c
   branches/SAMBA_3_0_RELEASE/source/smbd/share_access.c
   branches/SAMBA_3_0_RELEASE/source/smbd/trans2.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_ads.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_rpc_samsync.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_sam.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_usershare.c
   branches/SAMBA_3_0_RELEASE/source/utils/ntlm_auth.c
   branches/SAMBA_3_0_RELEASE/source/utils/pdbedit.c


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


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

2006-10-01 Thread tridge
Volker,

  Attempt to fix the BSD RAW-CHKPATH failures: In Samba3 we rely on opendir
  returning ENOTDIR when the file opened is not a directory. Can we merge this
  back into Samba4?

yes, please merge.

We should also see if we can get rid of repdir_getdents()
completely. I suspect all hosts that have getdents() and need the
directory functions replaced also have getdirentries(). If we can't
get rid of it then we could use one C file and a couple of #ifdef.

I used two C files as I really expected repdir_getdirentries() to not
work at all. It surprised me a lot when it worked! I was expecting to
svn delete it when the build farm showed it not working (Metze was the
one who suggested it might work).

  +if (fstat(d-fd, sb)  0) {
  +close(d-fd);
  +free(d);
  +return NULL;
  +}

very minor point with this. The correct test for the failure of most
system calls in the C library API is == -1 not  0. It doesn't
matter for this call, but for some calls it does matter, so its a good
habit to get into. Testing for != 0 is also OK, and is even arguably
better for this case.

Cheers, Tridge


Build status as of Mon Oct 2 00:00:02 2006

2006-10-01 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-10-01 
00:01:04.0 +
+++ /home/build/master/cache/broken_results.txt 2006-10-02 00:00:34.0 
+
@@ -1,21 +1,21 @@
-Build status as of Sun Oct  1 00:00:02 2006
+Build status as of Mon Oct  2 00:00:02 2006
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   38 7  0 
-distcc   38 7  0 
-ldb  35 5  0 
-libreplace   37 2  0 
-lorikeet-heimdal 2  2  0 
+ccache   45 8  0 
+distcc   45 7  0 
+ldb  41 5  0 
+libreplace   41 1  0 
+lorikeet-heimdal 8  5  0 
 ppp  17 0  0 
-rsync38 11 0 
+rsync45 11 0 
 samba0  0  0 
 samba-docs   0  0  0 
-samba4   36 9  1 
-samba_3_038 11 1 
-smb-build31 3  0 
-talloc   40 5  0 
-tdb  38 2  0 
+samba4   41 9  1 
+samba_3_040 12 1 
+smb-build30 3  0 
+talloc   45 4  0 
+tdb  43 3  0 
 


svn commit: samba r19019 - in branches/SAMBA_4_0: jsonrpc source/scripting/ejs

2006-10-01 Thread derrell
Author: derrell
Date: 2006-10-02 02:36:27 + (Mon, 02 Oct 2006)
New Revision: 19019

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

Log:
Add a parser for javascript literals.  This is implemented for parsing JSON
strings, but is generally useful for creating ejs variables from object or
array literals, which aren't supported in the old version of ejs that we're
using.

This parser is implemented in C, but is callable from an ejs script via
literal_to_var().

Added:
   branches/SAMBA_4_0/source/scripting/ejs/literal.c
Modified:
   branches/SAMBA_4_0/jsonrpc/json.esp
   branches/SAMBA_4_0/source/scripting/ejs/config.mk


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


svn commit: samba r19020 - in branches/SAMBA_4_0/source/scripting/ejs: .

2006-10-01 Thread derrell
Author: derrell
Date: 2006-10-02 02:38:02 + (Mon, 02 Oct 2006)
New Revision: 19020

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

Log:
move jsonrpc_include to a more appropriate location in the file, and call the 
setup function for parsing literals.
Modified:
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c  2006-10-02 02:36:27 UTC 
(rev 19019)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c  2006-10-02 02:38:02 UTC 
(rev 19020)
@@ -83,7 +83,7 @@
{ MPR_TYPE_INT,  integer },
{ MPR_TYPE_INT64,integer64 },
{ MPR_TYPE_OBJECT,   object },
-   { MPR_TYPE_FUNCTION, function },
+   { MPR_TYPE_FUNCTION, js_function },
{ MPR_TYPE_STRING,   string },
{ MPR_TYPE_STRING_CFUNCTION, string_c_function },
{ MPR_TYPE_PTR,  pointer }
@@ -152,11 +152,21 @@
 }
 
 /*
-  jsonrpc_include() allows you to include jsonrpc files from a path
-  based at jsonrpc base = in smb.conf.
+  return the current version
 */
-static int ejs_jsonrpc_include(int eid, int argc, char **argv)
+static int ejs_version(MprVarHandle eid, int argc, struct MprVar **argv)
 {
+   mpr_ReturnString(eid, SAMBA_VERSION_STRING);
+   return 0;
+}
+
+
+/*
+ * jsonrpc_include() allows you to include jsonrpc files from a path based at
+ * jsonrpc base = in smb.conf.
+ */
+static int jsonrpc_include(int eid, int argc, char **argv)
+{
 int ret = -1;
 char *path;
 char *emsg;
@@ -192,15 +202,8 @@
return 0;
 }
 
-/*
-  return the current version
-*/
-static int ejs_version(MprVarHandle eid, int argc, struct MprVar **argv)
-{
-   mpr_ReturnString(eid, SAMBA_VERSION_STRING);
-   return 0;
-}
 
+
 static void (*ejs_exception_handler) (const char *) = NULL;
 
 _PUBLIC_ void ejs_exception(const char *reason)
@@ -222,6 +225,7 @@
smb_setup_ejs_options();
smb_setup_ejs_credentials();
smb_setup_ejs_param();
+smb_setup_ejs_literal();

ejsnet_setup();
 
@@ -235,7 +239,7 @@
ejsDefineCFunction(-1, typeof, ejs_typeof, NULL, 
MPR_VAR_SCRIPT_HANDLE);
ejsDefineCFunction(-1, nativeTypeOf, ejs_typeof_native, NULL, 
MPR_VAR_SCRIPT_HANDLE);
ejsDefineStringCFunction(-1, libinclude, ejs_libinclude, NULL, 
MPR_VAR_SCRIPT_HANDLE);
-   ejsDefineStringCFunction(-1, jsonrpc_include, ejs_jsonrpc_include, 
NULL, MPR_VAR_SCRIPT_HANDLE);
ejsDefineCFunction(-1, version, ejs_version, NULL, 
MPR_VAR_SCRIPT_HANDLE);
+   ejsDefineStringCFunction(-1, jsonrpc_include, jsonrpc_include, NULL, 
MPR_VAR_SCRIPT_HANDLE);
 }
 



svn commit: samba r19021 - in branches/SAMBA_4_0/source/lib/appweb/ejs: .

2006-10-01 Thread derrell
Author: derrell
Date: 2006-10-02 02:38:43 + (Mon, 02 Oct 2006)
New Revision: 19021

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

Log:
match the prototype for a trigger function
Modified:
   branches/SAMBA_4_0/source/lib/appweb/ejs/ejsProcs.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/appweb/ejs/ejsProcs.c
===
--- branches/SAMBA_4_0/source/lib/appweb/ejs/ejsProcs.c 2006-10-02 02:38:02 UTC 
(rev 19020)
+++ branches/SAMBA_4_0/source/lib/appweb/ejs/ejsProcs.c 2006-10-02 02:38:43 UTC 
(rev 19021)
@@ -59,7 +59,7 @@
  */
 static MprVarTriggerStatus lengthTrigger(MprVarTriggerOp op, 
MprProperties *parentProperties, MprVar *prop, MprVar *newValue,
-   bool copyRef);
+   int copyRef);
 
 
/**/
 /*
@@ -340,7 +340,7 @@
 
 static MprVarTriggerStatus lengthTrigger(MprVarTriggerOp op, 
MprProperties *parentProperties, MprVar *prop, MprVar *newValue, 
-   bool copyRef)
+   int copyRef)
 {
switch (op) {
case MPR_VAR_READ:



svn commit: samba r19022 - in branches/SAMBA_4_0/source/lib/appweb/mpr: .

2006-10-01 Thread derrell
Author: derrell
Date: 2006-10-02 02:39:05 + (Mon, 02 Oct 2006)
New Revision: 19022

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

Log:
eliminate a warning
Modified:
   branches/SAMBA_4_0/source/lib/appweb/mpr/var.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/appweb/mpr/var.c
===
--- branches/SAMBA_4_0/source/lib/appweb/mpr/var.c  2006-10-02 02:38:43 UTC 
(rev 19021)
+++ branches/SAMBA_4_0/source/lib/appweb/mpr/var.c  2006-10-02 02:39:05 UTC 
(rev 19022)
@@ -1363,7 +1363,7 @@
memset(v, 0x0, sizeof(v));
v.type = MPR_TYPE_STRING;
if (value == 0) {
-   v.string = ;
+   v.string = (char*) ;
} else if (allocate) {
v.string = mprStrdup(value);
v.allocatedData = 1;



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

2006-10-01 Thread metze
Author: metze
Date: 2006-10-02 05:52:42 + (Mon, 02 Oct 2006)
New Revision: 19023

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

Log:
lets see what the build-farm says about trying the
getdirentries() based readdir() replacement first.

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/repdir.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/repdir.m4
===
--- branches/SAMBA_4_0/source/lib/replace/repdir.m4 2006-10-02 02:39:05 UTC 
(rev 19022)
+++ branches/SAMBA_4_0/source/lib/replace/repdir.m4 2006-10-02 05:52:42 UTC 
(rev 19023)
@@ -8,28 +8,6 @@
 ])
 
 #
-# try to replace with getdents() if needed
-#
-if test x$libreplace_cv_READDIR_NEEDED = xyes; then
-AC_CHECK_FUNCS(getdents)
-AC_CACHE_CHECK([for replacing readdir using 
getdents()],libreplace_cv_READDIR_GETDENTS,[
-   AC_TRY_RUN([
-#define _LIBREPLACE_REPLACE_H
-#include $libreplacedir/repdir_getdents.c
-#define test_readdir_os2_delete main
-#include $libreplacedir/test/os2_delete.c],
-   [libreplace_cv_READDIR_GETDENTS=yes],
-   [libreplace_cv_READDIR_GETDENTS=no])
-])
-fi
-if test x$libreplace_cv_READDIR_GETDENTS = xyes; then
-   AC_DEFINE(REPLACE_READDIR,1,[replace readdir])
-   AC_DEFINE(REPLACE_READDIR_GETDENTS,1,[replace readdir using getdents()])
-   LIBREPLACEOBJ=${LIBREPLACEOBJ} repdir_getdents.o
-   libreplace_cv_READDIR_NEEDED=no
-fi
-
-#
 # try to replace with getdirentries() if needed
 #
 if test x$libreplace_cv_READDIR_NEEDED = xyes; then
@@ -68,6 +46,28 @@
libreplace_cv_READDIR_NEEDED=no
 fi
 
+#
+# try to replace with getdents() if needed
+#
+if test x$libreplace_cv_READDIR_NEEDED = xyes; then
+AC_CHECK_FUNCS(getdents)
+AC_CACHE_CHECK([for replacing readdir using 
getdents()],libreplace_cv_READDIR_GETDENTS,[
+   AC_TRY_RUN([
+#define _LIBREPLACE_REPLACE_H
+#include $libreplacedir/repdir_getdents.c
+#define test_readdir_os2_delete main
+#include $libreplacedir/test/os2_delete.c],
+   [libreplace_cv_READDIR_GETDENTS=yes],
+   [libreplace_cv_READDIR_GETDENTS=no])
+])
+fi
+if test x$libreplace_cv_READDIR_GETDENTS = xyes; then
+   AC_DEFINE(REPLACE_READDIR,1,[replace readdir])
+   AC_DEFINE(REPLACE_READDIR_GETDENTS,1,[replace readdir using getdents()])
+   LIBREPLACEOBJ=${LIBREPLACEOBJ} repdir_getdents.o
+   libreplace_cv_READDIR_NEEDED=no
+fi
+
 AC_MSG_CHECKING([a usable readdir()])
 if test x$libreplace_cv_READDIR_NEEDED = xyes; then
AC_MSG_RESULT(no)



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

2006-10-01 Thread mimir
Author: mimir
Date: 2006-10-02 05:53:45 + (Mon, 02 Oct 2006)
New Revision: 19024

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

Log:
remove read-only and policy dependent fields and flags
from user modify routines.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/libnet_user.c
   branches/SAMBA_4_0/source/libnet/libnet_user.h
   branches/SAMBA_4_0/source/libnet/userinfo.c
   branches/SAMBA_4_0/source/libnet/userman.c
   branches/SAMBA_4_0/source/libnet/userman.h


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_user.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_user.c  2006-10-02 05:52:42 UTC 
(rev 19023)
+++ branches/SAMBA_4_0/source/libnet/libnet_user.c  2006-10-02 05:53:45 UTC 
(rev 19024)
@@ -569,21 +569,6 @@
/* profile path change */
SET_FIELD_LSA_STRING(r-in, user, mod, profile_path, 
USERMOD_FIELD_PROFILE_PATH);
 
-   /* allow password change time */
-   SET_FIELD_NTTIME(r-in, user, mod, allow_password_change, 
USERMOD_FIELD_ALLOW_PASS_CHG);
-
-   /* 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);
-
-   /* 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);
 
@@ -629,6 +614,7 @@
 struct user_info_state {
struct libnet_context *ctx;
const char *domain_name;
+   const char *user_name;
struct libnet_LookupName lookup;
struct libnet_DomainOpen domopen;
struct libnet_rpc_userinfo userinfo;
@@ -639,7 +625,7 @@
 
 
 static void continue_name_found(struct composite_context *ctx);
-static void continue_domain_opened(struct composite_context *ctx);
+static void continue_domain_open_info(struct composite_context *ctx);
 static void continue_info_received(struct composite_context *ctx);
 
 
@@ -650,6 +636,7 @@
 {
struct composite_context *c;
struct user_info_state *s;
+   struct composite_context *prereq_ctx;
struct composite_context *lookup_req;
 
c = composite_create(mem_ctx, ctx-event_ctx);
@@ -663,9 +650,14 @@
s-monitor_fn = monitor;
s-ctx = ctx;
s-domain_name = talloc_strdup(c, r-in.domain_name);
+   s-user_name = talloc_strdup(c, r-in.user_name);
 
+   prereq_ctx = domain_opened(ctx, s-domain_name, c, s-domopen,
+  continue_domain_open_info, monitor);
+   if (prereq_ctx) return prereq_ctx;
+
s-lookup.in.domain_name = s-domain_name;
-   s-lookup.in.name= talloc_strdup(c, r-in.user_name);
+   s-lookup.in.name= s-user_name;
 
lookup_req = libnet_LookupName_send(ctx, c, s-lookup, s-monitor_fn);
if (composite_nomem(lookup_req, c)) return c;
@@ -675,35 +667,32 @@
 }
 
 
-static void continue_name_found(struct composite_context *ctx)
+static void continue_domain_open_info(struct composite_context *ctx)
 {
struct composite_context *c;
struct user_info_state *s;
-   struct composite_context *domopen_req;
+   struct composite_context *lookup_req;
+   struct monitor_msg msg;
 
c = talloc_get_type(ctx-async.private_data, struct composite_context);
s = talloc_get_type(c-private_data, struct user_info_state);
 
-   c-status = libnet_LookupName_recv(ctx, c, s-lookup);
+   c-status = libnet_DomainOpen_recv(ctx, s-ctx, c, s-domopen);
if (!composite_is_ok(c)) return;
+   
+   if (s-monitor_fn) s-monitor_fn(msg);
 
-   if (s-lookup.out.sid_type != SID_NAME_USER) {
-   composite_error(c, NT_STATUS_NO_SUCH_USER);
-   return;
-   }
+   s-lookup.in.domain_name = s-domain_name;
+   s-lookup.in.name= s-user_name;
 
-   s-domopen.in.type = DOMAIN_SAMR;
-   s-domopen.in.domain_name = s-domain_name;
-   s-domopen.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
-
-   domopen_req = libnet_DomainOpen_send(s-ctx, s-domopen, 
s-monitor_fn);
-   if (composite_nomem(domopen_req, c)) return;
+   lookup_req = libnet_LookupName_send(s-ctx, c, s-lookup, 
s-monitor_fn);
+   if (composite_nomem(lookup_req, c)) return;

-   composite_continue(c, domopen_req, continue_domain_opened, c);
+   composite_continue(c, lookup_req, continue_rpc_userinfo, c);
 }
 
 
-static void continue_domain_opened(struct composite_context *ctx)
+static void continue_name_found(struct composite_context *ctx)
 {
struct composite_context *c;