svn commit: samba r21761 - in branches/SAMBA_4_0/source: lib/ldb/common lib/ldb/ldb_ildap libcli/ldap torture/ldap

2007-03-07 Thread abartlet
Author: abartlet
Date: 2007-03-08 06:23:39 + (Thu, 08 Mar 2007)
New Revision: 21761

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21761

Log:
- Give more detail on LDAP client library failures (make it clear
  where the error is from)

- Make default error string more consistant

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
   branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c
   branches/SAMBA_4_0/source/torture/ldap/common.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c  2007-03-08 
03:32:28 UTC (rev 21760)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c  2007-03-08 
06:23:39 UTC (rev 21761)
@@ -432,7 +432,7 @@
}
if (!ldb_errstring(module->ldb)) {
/* Set a default error string, to place the blame somewhere */
-   ldb_asprintf_errstring(module->ldb, "error in module %s: %s", 
module->ops->name, ldb_strerror(ret));
+   ldb_asprintf_errstring(module->ldb, "error in module %s: %s 
(%d)", module->ops->name, ldb_strerror(ret), ret);
}
return ret;
 }

Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
===
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2007-03-08 
03:32:28 UTC (rev 21760)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2007-03-08 
06:23:39 UTC (rev 21761)
@@ -123,10 +123,16 @@
 */
 static int ildb_map_error(struct ildb_private *ildb, NTSTATUS status)
 {
+   TALLOC_CTX *mem_ctx = talloc_new(ildb);
if (NT_STATUS_IS_OK(status)) {
return LDB_SUCCESS;
}
-   ldb_set_errstring(ildb->module->ldb, ldap_errstr(ildb->ldap, status));
+   if (!mem_ctx) {
+   ldb_oom(ildb->module->ldb);
+   return LDB_ERR_OPERATIONS_ERROR;
+   }
+   ldb_set_errstring(ildb->module->ldb, ldap_errstr(ildb->ldap, mem_ctx, 
status));
+   talloc_free(mem_ctx);
if (NT_STATUS_IS_LDAP(status)) {
return NT_STATUS_LDAP_CODE(status);
}
@@ -763,7 +769,7 @@
status = ldap_connect(ildb->ldap, url);
if (!NT_STATUS_IS_OK(status)) {
ldb_debug(ldb, LDB_DEBUG_ERROR, "Failed to connect to ldap URL 
'%s' - %s\n",
- url, ldap_errstr(ildb->ldap, status));
+ url, ldap_errstr(ildb->ldap, module, status));
goto failed;
}
 
@@ -783,14 +789,14 @@
status = ldap_bind_simple(ildb->ldap, bind_dn, 
password);
if (!NT_STATUS_IS_OK(status)) {
ldb_debug(ldb, LDB_DEBUG_ERROR, "Failed to bind 
- %s\n",
- ldap_errstr(ildb->ldap, status));
+ ldap_errstr(ildb->ldap, module, 
status));
goto failed;
}
} else {
status = ldap_bind_sasl(ildb->ldap, creds);
if (!NT_STATUS_IS_OK(status)) {
ldb_debug(ldb, LDB_DEBUG_ERROR, "Failed to bind 
- %s\n",
- ldap_errstr(ildb->ldap, status));
+ ldap_errstr(ildb->ldap, module, 
status));
goto failed;
}
}

Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c
===
--- branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c 2007-03-08 03:32:28 UTC 
(rev 21760)
+++ branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c 2007-03-08 06:23:39 UTC 
(rev 21761)
@@ -562,6 +562,7 @@
msg->messageid = req->messageid;
 
if (!ldap_encode(msg, &req->data, req)) {
+   status = NT_STATUS_INTERNAL_ERROR;
goto failed;
}
 
@@ -704,12 +705,14 @@
 /*
   return error string representing the last error
 */
-const char *ldap_errstr(struct ldap_connection *conn, NTSTATUS status)
+const char *ldap_errstr(struct ldap_connection *conn, 
+   TALLOC_CTX *mem_ctx, 
+   NTSTATUS status)
 {
if (NT_STATUS_IS_LDAP(status) && conn->last_error != NULL) {
-   return conn->last_error;
+   return talloc_strdup(mem_ctx, conn->last_error);
}
-   return nt_errstr(status);
+   return talloc_asprintf(mem_ctx, "LDAP client internal error: %s", 
nt_errstr(status));
 }
 
 

Modified: branches/SAMBA_4_0/source/torture/ldap/common.c
===
--- branches/SAMBA_4_

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

2007-03-07 Thread sfrench
Author: sfrench
Date: 2007-03-08 05:58:19 + (Thu, 08 Mar 2007)
New Revision: 107

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=107

Log:
Merge with git tree

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/Makefile
   branches/linux-converged-for-old-kernels/fs/cifs/TODO
   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/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/readdir.c
   branches/linux-converged-for-old-kernels/fs/cifs/transport.c


Changeset:
Sorry, the patch is too large (538 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=107


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

2007-03-07 Thread sfrench
Author: sfrench
Date: 2007-03-08 05:35:21 + (Thu, 08 Mar 2007)
New Revision: 106

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=106

Log:
Merge with cifs-2.6.git

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/Makefile
   branches/linux-2.6-cifs-git-devel/fs/cifs/README
   branches/linux-2.6-cifs-git-devel/fs/cifs/TODO
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsglob.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/dir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/file.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/link.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/transport.c


Changeset:
Sorry, the patch is too large (1053 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=106


svn commit: linux-cifs-client r105 - in branches/linux-2.6-mainline/fs/cifs: .

2007-03-07 Thread sfrench
Author: sfrench
Date: 2007-03-08 05:34:46 + (Thu, 08 Mar 2007)
New Revision: 105

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=105

Log:
merge with mainline git 

Removed:
   branches/linux-2.6-mainline/fs/cifs/cifssmb.c.orig
Modified:
   branches/linux-2.6-mainline/fs/cifs/CHANGES
   branches/linux-2.6-mainline/fs/cifs/Makefile
   branches/linux-2.6-mainline/fs/cifs/README
   branches/linux-2.6-mainline/fs/cifs/TODO
   branches/linux-2.6-mainline/fs/cifs/cifsfs.c
   branches/linux-2.6-mainline/fs/cifs/cifsfs.h
   branches/linux-2.6-mainline/fs/cifs/cifsglob.h
   branches/linux-2.6-mainline/fs/cifs/cifspdu.h
   branches/linux-2.6-mainline/fs/cifs/cifsproto.h
   branches/linux-2.6-mainline/fs/cifs/cifssmb.c
   branches/linux-2.6-mainline/fs/cifs/connect.c
   branches/linux-2.6-mainline/fs/cifs/dir.c
   branches/linux-2.6-mainline/fs/cifs/file.c
   branches/linux-2.6-mainline/fs/cifs/inode.c
   branches/linux-2.6-mainline/fs/cifs/link.c
   branches/linux-2.6-mainline/fs/cifs/readdir.c
   branches/linux-2.6-mainline/fs/cifs/smbdes.c
   branches/linux-2.6-mainline/fs/cifs/transport.c


Changeset:
Sorry, the patch is too large (5707 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=105


svn commit: samba r21760 - in branches/SAMBA_4_0/source/lib/ldb/common: .

2007-03-07 Thread abartlet
Author: abartlet
Date: 2007-03-08 03:32:28 + (Thu, 08 Mar 2007)
New Revision: 21760

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21760

Log:
Try to pin down were some errors are coming from.  Ensure we at least
name the module.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c  2007-03-08 
03:00:42 UTC (rev 21759)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c  2007-03-08 
03:32:28 UTC (rev 21760)
@@ -392,32 +392,49 @@
 
 int ldb_next_request(struct ldb_module *module, struct ldb_request *request)
 {
+   int ret;
switch (request->operation) {
case LDB_SEARCH:
FIND_OP(module, search);
-   return module->ops->search(module, request);
+   ret = module->ops->search(module, request);
+   break;
case LDB_ADD:
FIND_OP(module, add);
-   return module->ops->add(module, request);
+   ret = module->ops->add(module, request);
+   break;
case LDB_MODIFY:
FIND_OP(module, modify);
-   return module->ops->modify(module, request);
+   ret = module->ops->modify(module, request);
+   break;
case LDB_DELETE:
FIND_OP(module, del);
-   return module->ops->del(module, request);
+   ret = module->ops->del(module, request);
+   break;
case LDB_RENAME:
FIND_OP(module, rename);
-   return module->ops->rename(module, request);
+   ret = module->ops->rename(module, request);
+   break;
case LDB_EXTENDED:
FIND_OP(module, extended);
-   return module->ops->extended(module, request);
+   ret = module->ops->extended(module, request);
+   break;
case LDB_SEQUENCE_NUMBER:
FIND_OP(module, sequence_number);
-   return module->ops->sequence_number(module, request);
+   ret = module->ops->sequence_number(module, request);
+   break;
default:
FIND_OP(module, request);
-   return module->ops->request(module, request);
+   ret = module->ops->request(module, request);
+   break;
}
+   if (ret == LDB_SUCCESS) {
+   return ret;
+   }
+   if (!ldb_errstring(module->ldb)) {
+   /* Set a default error string, to place the blame somewhere */
+   ldb_asprintf_errstring(module->ldb, "error in module %s: %s", 
module->ops->name, ldb_strerror(ret));
+   }
+   return ret;
 }
 
 int ldb_next_init(struct ldb_module *module)



svn commit: samba r21759 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd

2007-03-07 Thread jra
Author: jra
Date: 2007-03-08 03:00:42 + (Thu, 08 Mar 2007)
New Revision: 21759

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21759

Log:
Fix the same bug in a more elegant way, strrchr_m
is an expensive call
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/msdfs.c
   branches/SAMBA_3_0_25/source/smbd/msdfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/msdfs.c
===
--- branches/SAMBA_3_0/source/smbd/msdfs.c  2007-03-08 02:51:41 UTC (rev 
21758)
+++ branches/SAMBA_3_0/source/smbd/msdfs.c  2007-03-08 03:00:42 UTC (rev 
21759)
@@ -331,6 +331,7 @@
SMB_STRUCT_STAT sbuf;
NTSTATUS status;
pstring reqpath;
+   pstring local_dfspath;
 
if (!dp || !conn) {
DEBUG(1,("resolve_dfs_path: NULL dfs_path* or NULL 
connection_struct*!\n"));
@@ -385,6 +386,12 @@
return True;
}
 
+   /* Prepare to test only for '/' components in the given path,
+* so replace all '\\' characters with '/'. */
+
+   pstrcpy(local_dfspath, dfspath);
+   string_replace(local_dfspath, '\\', '/');
+
/* redirect if any component in the path is a link */
pstrcpy(reqpath, localpath);
p = strrchr_m(reqpath, '/');
@@ -402,14 +409,12 @@

if (consumedcntp) {
pstring buf;
-   pstrcpy(buf, dfspath);
-   trim_char(buf, '\0', '\\');
+   pstrcpy(buf, local_dfspath);
+   trim_char(buf, '\0', '/');
for (; consumed_level; consumed_level--) {
-   char *q, *q1, *q2;
-   /* Either '\\' or '/' may be a 
separator. */
-   q1 = strrchr_m(buf, '\\');
-   q2 = strrchr_m(buf, '/');
-   q = MAX(q1,q2);
+   char *q;
+   /* We made sure only '/' may be a 
separator above. */
+   q = strrchr_m(buf, '/');
if (q) {
*q = 0;
}

Modified: branches/SAMBA_3_0_25/source/smbd/msdfs.c
===
--- branches/SAMBA_3_0_25/source/smbd/msdfs.c   2007-03-08 02:51:41 UTC (rev 
21758)
+++ branches/SAMBA_3_0_25/source/smbd/msdfs.c   2007-03-08 03:00:42 UTC (rev 
21759)
@@ -331,6 +331,7 @@
SMB_STRUCT_STAT sbuf;
NTSTATUS status;
pstring reqpath;
+   pstring local_dfspath;
 
if (!dp || !conn) {
DEBUG(1,("resolve_dfs_path: NULL dfs_path* or NULL 
connection_struct*!\n"));
@@ -385,6 +386,12 @@
return True;
}
 
+   /* Prepare to test only for '/' components in the given path,
+* so replace all '\\' characters with '/'. */
+
+   pstrcpy(local_dfspath, dfspath);
+   string_replace(local_dfspath, '\\', '/');
+
/* redirect if any component in the path is a link */
pstrcpy(reqpath, localpath);
p = strrchr_m(reqpath, '/');
@@ -402,14 +409,12 @@

if (consumedcntp) {
pstring buf;
-   pstrcpy(buf, dfspath);
-   trim_char(buf, '\0', '\\');
+   pstrcpy(buf, local_dfspath);
+   trim_char(buf, '\0', '/');
for (; consumed_level; consumed_level--) {
-   char *q, *q1, *q2;
-   /* Either '\\' or '/' may be a 
separator. */
-   q1 = strrchr_m(buf, '\\');
-   q2 = strrchr_m(buf, '/');
-   q = MAX(q1,q2);
+   char *q;
+   /* We made sure only '/' may be a 
separator above. */
+   q = strrchr_m(buf, '/');
if (q) {
*q = 0;
}



svn commit: samba r21758 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd

2007-03-07 Thread jra
Author: jra
Date: 2007-03-08 02:51:41 + (Thu, 08 Mar 2007)
New Revision: 21758

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21758

Log:
Fix a very specific dfs bug when passing in POSIX
pathnames. When we're working out how much we've
consumed we need to backtrack by either a '/' or '\\'
component, as both are valid separators.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/msdfs.c
   branches/SAMBA_3_0_25/source/smbd/msdfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/msdfs.c
===
--- branches/SAMBA_3_0/source/smbd/msdfs.c  2007-03-08 01:40:49 UTC (rev 
21757)
+++ branches/SAMBA_3_0/source/smbd/msdfs.c  2007-03-08 02:51:41 UTC (rev 
21758)
@@ -92,7 +92,7 @@
ZERO_STRUCTP(pdp);
 
trim_char(temp,sepchar,sepchar);
-   DEBUG(10,("temp in parse_processed_dfs_path: .%s. after trimming 
\\'s\n",temp));
+   DEBUG(10,("temp in parse_processed_dfs_path: .%s. after trimming 
/'s\n",temp));
 
/* now tokenize */
/* parse out hostname */
@@ -401,12 +401,15 @@
*/

if (consumedcntp) {
-   char *q;
pstring buf;
pstrcpy(buf, dfspath);
trim_char(buf, '\0', '\\');
for (; consumed_level; consumed_level--) {
-   q = strrchr_m(buf, '\\');
+   char *q, *q1, *q2;
+   /* Either '\\' or '/' may be a 
separator. */
+   q1 = strrchr_m(buf, '\\');
+   q2 = strrchr_m(buf, '/');
+   q = MAX(q1,q2);
if (q) {
*q = 0;
}

Modified: branches/SAMBA_3_0_25/source/smbd/msdfs.c
===
--- branches/SAMBA_3_0_25/source/smbd/msdfs.c   2007-03-08 01:40:49 UTC (rev 
21757)
+++ branches/SAMBA_3_0_25/source/smbd/msdfs.c   2007-03-08 02:51:41 UTC (rev 
21758)
@@ -92,7 +92,7 @@
ZERO_STRUCTP(pdp);
 
trim_char(temp,sepchar,sepchar);
-   DEBUG(10,("temp in parse_processed_dfs_path: .%s. after trimming 
\\'s\n",temp));
+   DEBUG(10,("temp in parse_processed_dfs_path: .%s. after trimming 
/'s\n",temp));
 
/* now tokenize */
/* parse out hostname */
@@ -401,12 +401,15 @@
*/

if (consumedcntp) {
-   char *q;
pstring buf;
pstrcpy(buf, dfspath);
trim_char(buf, '\0', '\\');
for (; consumed_level; consumed_level--) {
-   q = strrchr_m(buf, '\\');
+   char *q, *q1, *q2;
+   /* Either '\\' or '/' may be a 
separator. */
+   q1 = strrchr_m(buf, '\\');
+   q2 = strrchr_m(buf, '/');
+   q = MAX(q1,q2);
if (q) {
*q = 0;
}



svn commit: samba-docs r1060 - in trunk/manpages-3: .

2007-03-07 Thread jpeach
Author: jpeach
Date: 2007-03-08 01:42:35 + (Thu, 08 Mar 2007)
New Revision: 1060

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1060

Log:
Add chflags to the list of audited operations and sort the list.

Modified:
   trunk/manpages-3/vfs_full_audit.8.xml


Changeset:
Modified: trunk/manpages-3/vfs_full_audit.8.xml
===
--- trunk/manpages-3/vfs_full_audit.8.xml   2007-03-07 07:37:48 UTC (rev 
1059)
+++ trunk/manpages-3/vfs_full_audit.8.xml   2007-03-08 01:42:35 UTC (rev 
1060)
@@ -35,99 +35,100 @@
complete set of Samba VFS operations:
 

+aio_cancel
+aio_error
+aio_fsync
+aio_read
+aio_return
+aio_suspend
+aio_write
+chdir
+chflags
+chmod
+chmod_acl
+chown
+close
+closedir
 connect
 disconnect
 disk_free
+fchmod
+fchmod_acl
+fchown
+fget_nt_acl
+fgetxattr
+flistxattr
+fremovexattr
+fset_nt_acl
+fsetxattr
+fstat
+fsync
+ftruncate
+get_nt_acl
 get_quota
-set_quota
 get_shadow_copy_data
-statvfs
+getlock
+getwd
+getxattr
+kernel_flock
+lgetxattr
+link
+linux_setlease
+listxattr
+llistxattr
+lock
+lremovexattr
+lseek
+lsetxattr
+lstat
+mkdir
+mknod
+open
 opendir
+pread
+pwrite
+read
 readdir
-seekdir
-telldir
+readlink
+realpath
+removexattr
+rename
 rewinddir
-mkdir
 rmdir
-closedir
-open
-close
-read
-pread
-write
-pwrite
-lseek
+seekdir
 sendfile
-rename
-fsync
+set_nt_acl
+set_quota
+setxattr
 stat
-fstat
-lstat
-unlink
-chmod
-fchmod
-chown
-fchown
-chdir
-getwd
-utime
-ftruncate
-lock
-kernel_flock
-linux_setlease
-getlock
+statvfs
 symlink
-readlink
-link
-mknod
-realpath
-fget_nt_acl
-get_nt_acl
-fset_nt_acl
-set_nt_acl
-chmod_acl
-fchmod_acl
+sys_acl_add_perm
+sys_acl_clear_perms
+sys_acl_create_entry
+sys_acl_delete_def_file
+sys_acl_free_acl
+sys_acl_free_qualifier
+sys_acl_free_text
 sys_acl_get_entry
-sys_acl_get_tag_type
+sys_acl_get_fd
+sys_acl_get_file
+sys_acl_get_perm
 sys_acl_get_permset
 sys_acl_get_qualifier
-sys_acl_get_file
-sys_acl_get_fd
-sys_acl_clear_perms
-sys_acl_add_perm
-sys_acl_to_text
+sys_acl_get_tag_type
 sys_acl_init
-sys_acl_create_entry
+sys_acl_set_fd
+sys_acl_set_file
+sys_acl_set_permset
+sys_acl_set_qualifier
 sys_acl_set_tag_type
-sys_acl_set_qualifier
-sys_acl_set_permset
+sys_acl_to_text
 sys_acl_valid
-sys_acl_set_file
-sys_acl_set_fd
-sys_acl_delete_def_file
-sys_acl_get_perm
-sys_acl_free_text
-sys_acl_free_acl
-sys_acl_free_qualifier
-getxattr
-lgetxattr
-fgetxattr
-listxattr
-llistxattr
-flistxattr
-removexattr
-lremovexattr
-fremovexattr
-setxattr
-lsetxattr
-fsetxattr
-aio_read
-aio_write
-aio_return
-aio_cancel
-aio_error
-aio_fsync
-aio_suspend
+telldir
+unlink
+utime
+write

 
In addition to these operations,



svn commit: samba r21757 - in branches/SAMBA_3_0/source: include modules

2007-03-07 Thread jpeach
Author: jpeach
Date: 2007-03-08 01:40:49 + (Thu, 08 Mar 2007)
New Revision: 21757

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21757

Log:
Add SMB_VFS_CHFLAGS operation.

Modified:
   branches/SAMBA_3_0/source/include/vfs.h
   branches/SAMBA_3_0/source/include/vfs_macros.h
   branches/SAMBA_3_0/source/modules/vfs_default.c
   branches/SAMBA_3_0/source/modules/vfs_full_audit.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/vfs.h
===
--- branches/SAMBA_3_0/source/include/vfs.h 2007-03-07 23:58:40 UTC (rev 
21756)
+++ branches/SAMBA_3_0/source/include/vfs.h 2007-03-08 01:40:49 UTC (rev 
21757)
@@ -69,7 +69,8 @@
Also included linux setlease call - jmcd */
 /* Changed to version 20, use ntimes call instead of utime (greater
  * timestamp resolition. JRA. */
-#define SMB_VFS_INTERFACE_VERSION 20
+/* Changed to version21 to add chflags operation -- jpeach */
+#define SMB_VFS_INTERFACE_VERSION 21
 
 
 /* to bug old modules which are trying to compile with the old functions */
@@ -158,6 +159,7 @@
SMB_VFS_OP_MKNOD,
SMB_VFS_OP_REALPATH,
SMB_VFS_OP_NOTIFY_WATCH,
+   SMB_VFS_OP_CHFLAGS,
 
/* NT ACL operations. */
 
@@ -289,6 +291,7 @@
  void *private_data,
  struct notify_event 
*ev),
 void *private_data, void *handle_p);
+   int (*chflags)(struct vfs_handle_struct *handle, const char 
*path, uint flags);

/* NT ACL operations. */

@@ -406,6 +409,7 @@
struct vfs_handle_struct *mknod;
struct vfs_handle_struct *realpath;
struct vfs_handle_struct *notify_watch;
+   struct vfs_handle_struct *chflags;
 
/* NT ACL operations. */
 

Modified: branches/SAMBA_3_0/source/include/vfs_macros.h
===
--- branches/SAMBA_3_0/source/include/vfs_macros.h  2007-03-07 23:58:40 UTC 
(rev 21756)
+++ branches/SAMBA_3_0/source/include/vfs_macros.h  2007-03-08 01:40:49 UTC 
(rev 21757)
@@ -79,6 +79,7 @@
 #define SMB_VFS_MKNOD(conn, path, mode, dev) 
((conn)->vfs.ops.mknod((conn)->vfs.handles.mknod, (path), (mode), (dev)))
 #define SMB_VFS_REALPATH(conn, path, resolved_path) 
((conn)->vfs.ops.realpath((conn)->vfs.handles.realpath, (path), 
(resolved_path)))
 #define SMB_VFS_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) 
((conn)->vfs.ops.notify_watch((conn)->vfs.handles.notify_watch, (ctx), (e), 
(callback), (private_data), (handle_p)))
+#define SMB_VFS_CHFLAGS(conn, path, flags) 
((conn)->vfs.ops.chflags((conn)->vfs.handles.chflags, (path), (flags)))
 
 /* NT ACL operations. */
 #define SMB_VFS_FGET_NT_ACL(fsp, fd, security_info, ppdesc) 
((fsp)->conn->vfs.ops.fget_nt_acl((fsp)->conn->vfs.handles.fget_nt_acl, (fsp), 
(fd), (security_info), (ppdesc)))
@@ -194,6 +195,7 @@
 #define SMB_VFS_OPAQUE_MKNOD(conn, path, mode, dev) 
((conn)->vfs_opaque.ops.mknod((conn)->vfs_opaque.handles.mknod, (path), (mode), 
(dev)))
 #define SMB_VFS_OPAQUE_REALPATH(conn, path, resolved_path) 
((conn)->vfs_opaque.ops.realpath((conn)->vfs_opaque.handles.realpath, (path), 
(resolved_path)))
 #define SMB_VFS_OPAQUE_NOTIFY_WATCH(conn, ctx, e, callback, private_data, 
handle_p) 
((conn)->vfs_opaque.ops.notify_watch((conn)->vfs_opaque.handles.notify_watch, 
(ctx), (e), (callback), (private_data), (handle_p)))
+#define SMB_VFS_OPAQUE_CHFLAGS(conn, path, flags) 
((conn)->vfs_opaque.ops.chflags((conn)->vfs_opaque.handles.chflags, (path), 
(flags)))
 
 /* NT ACL operations. */
 #define SMB_VFS_OPAQUE_FGET_NT_ACL(fsp, fd, security_info, ppdesc) 
((fsp)->conn->vfs_opaque.ops.fget_nt_acl((fsp)->conn->vfs_opaque.handles.fget_nt_acl,
 (fsp), (fd), (security_info), (ppdesc)))
@@ -310,6 +312,7 @@
 #define SMB_VFS_NEXT_MKNOD(handle, path, mode, dev) 
((handle)->vfs_next.ops.mknod((handle)->vfs_next.handles.mknod, (path), (mode), 
(dev)))
 #define SMB_VFS_NEXT_REALPATH(handle, path, resolved_path) 
((handle)->vfs_next.ops.realpath((handle)->vfs_next.handles.realpath, (path), 
(resolved_path)))
 #define SMB_VFS_NEXT_NOTIFY_WATCH(conn, ctx, e, callback, private_data, 
handle_p) 
((conn)->vfs_next.ops.notify_watch((conn)->vfs_next.handles.notify_watch, 
(ctx), (e), (callback), (private_data), (handle_p)))
+#define SMB_VFS_NEXT_CHFLAGS(handle, path, flags) 
((handle)->vfs_next.ops.chflags((handle)->vfs_next.handles.chflags, (path), 
(flags)))
 
 /* NT ACL operations. */
 #define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, fd, security_info, ppdesc) 
((handle)->vfs_next.ops.fget_nt_acl((handle)->vfs_next.handles.fget_nt_acl, 
(fsp), (fd), (security_info), (ppdesc)))

Modified: branches/SAMBA_3_0/source/modules/vfs_default.c
===

Rev 66: merged changes from peter in http://samba.org/~tridge/ctdb

2007-03-07 Thread tridge

revno: 66
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Thu 2007-03-08 11:27:15 +1100
message:
  merged changes from peter
modified:
  ib/ibw_ctdb.c  ibw_ctdb.c-20070102171255-7krov7858dqza466-1
  ib/ibw_ctdb.h  ibw_ctdb.h-20070102171259-nmuvtzt98aqzg7xp-1
  ib/ibw_ctdb_init.c 
ibw_ctdb_init.c-20070102171305-cn2z4k7ibx8141d5-1
  ib/ibwrapper.c ibwrapper.c-20061204130028-0125b4f5a72f4b11
  ib/ibwrapper.h ibwrapper.h-20061204130028-32755c6266dd3c49
  ib/ibwrapper_test.c
ibwrapper_test.c-20061214171730-h11a2z5ed6pt66hj-1

revno: 44.1.27
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Peter Somogyi <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Mon 2007-02-26 11:59:20 +0100
message:
  ib: added external send queue to workaround downtime
  Workaround is because I couldn't find a correct way in ib to reconnect 
cleanly (with queue kept) when destination is unreachable.
  When connection is broken, all internal queue contents are being 
destroyed and reconnects automatically.
  An "external" send queue is kept until the connection is up again for a 
dest node.

revno: 44.1.26
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Peter Somogyi <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Thu 2007-02-22 18:25:18 +0100
message:
  merged tridge's code

revno: 44.1.25
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Peter Somogyi <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Fri 2007-02-16 15:21:31 +0100
message:
  workaround proposal for the initialization-problem

revno: 44.1.24
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Peter Somogyi <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Fri 2007-02-16 15:20:36 +0100
message:
  merged tridge's fix

Diff too large for email (772, the limit is 200).


Build status as of Thu Mar 8 00:00:02 2007

2007-03-07 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-03-07 
00:03:38.0 +
+++ /home/build/master/cache/broken_results.txt 2007-03-08 00:01:13.0 
+
@@ -1,4 +1,4 @@
-Build status as of Wed Mar  7 00:00:03 2007
+Build status as of Thu Mar  8 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -8,16 +8,16 @@
 ctdb 0  0  0 
 distcc   4  1  0 
 ldb  32 6  0 
-libreplace   29 2  0 
+libreplace   30 3  0 
 lorikeet-heimdal 29 15 0 
 pidl 20 2  0 
 ppp  13 0  0 
-rsync34 4  0 
+rsync34 5  0 
 samba0  0  0 
 samba-docs   0  0  0 
 samba-gtk4  4  0 
-samba4   36 14 0 
-samba_3_040 25 1 
+samba4   38 15 0 
+samba_3_040 18 1 
 smb-build29 29 0 
 talloc   34 1  0 
 tdb  32 3  0 


svn commit: samba r21756 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd

2007-03-07 Thread jra
Author: jra
Date: 2007-03-07 23:58:40 + (Wed, 07 Mar 2007)
New Revision: 21756

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21756

Log:
An invarient the dfs code depended on for POSIX paths
is no longer true, so fix it.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/msdfs.c
   branches/SAMBA_3_0_25/source/smbd/msdfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/msdfs.c
===
--- branches/SAMBA_3_0/source/smbd/msdfs.c  2007-03-07 22:29:21 UTC (rev 
21755)
+++ branches/SAMBA_3_0/source/smbd/msdfs.c  2007-03-07 23:58:40 UTC (rev 
21756)
@@ -78,16 +78,13 @@
  into the dfs_path structure 
  This code is dependent on the fact that check_path_syntax() will
  convert '\\' characters to '/'.
- When POSIX pathnames have been selected this doesn't happen, so we
- must look for the unaltered separator of '\\' instead of the modified '/'.
- JRA.
  **/
 
 static BOOL parse_processed_dfs_path(char* pathname, struct dfs_path *pdp, 
BOOL allow_wcards)
 {
pstring pathname_local;
char *p,*temp;
-   const char sepchar = lp_posix_pathnames() ? '\\' : '/';
+   const char sepchar = '/';
 
pstrcpy(pathname_local,pathname);
p = temp = pathname_local;

Modified: branches/SAMBA_3_0_25/source/smbd/msdfs.c
===
--- branches/SAMBA_3_0_25/source/smbd/msdfs.c   2007-03-07 22:29:21 UTC (rev 
21755)
+++ branches/SAMBA_3_0_25/source/smbd/msdfs.c   2007-03-07 23:58:40 UTC (rev 
21756)
@@ -78,16 +78,13 @@
  into the dfs_path structure 
  This code is dependent on the fact that check_path_syntax() will
  convert '\\' characters to '/'.
- When POSIX pathnames have been selected this doesn't happen, so we
- must look for the unaltered separator of '\\' instead of the modified '/'.
- JRA.
  **/
 
 static BOOL parse_processed_dfs_path(char* pathname, struct dfs_path *pdp, 
BOOL allow_wcards)
 {
pstring pathname_local;
char *p,*temp;
-   const char sepchar = lp_posix_pathnames() ? '\\' : '/';
+   const char sepchar = '/';
 
pstrcpy(pathname_local,pathname);
p = temp = pathname_local;



svn commit: samba r21754 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/smbd SAMBA_3_0_25/source/include SAMBA_3_0_25/source/smbd

2007-03-07 Thread jra
Author: jra
Date: 2007-03-07 22:12:58 + (Wed, 07 Mar 2007)
New Revision: 21754

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21754

Log:
Volker is completely correct. There's no need for
the RESOLVE_DFSPATH macros and their varients
any more. Fix reporting profile bug with all
error returns.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/msdfs.h
   branches/SAMBA_3_0/source/smbd/msdfs.c
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/trans2.c
   branches/SAMBA_3_0_25/source/include/msdfs.h
   branches/SAMBA_3_0_25/source/smbd/msdfs.c
   branches/SAMBA_3_0_25/source/smbd/nttrans.c
   branches/SAMBA_3_0_25/source/smbd/reply.c
   branches/SAMBA_3_0_25/source/smbd/trans2.c


Changeset:
Sorry, the patch is too large (753 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21754


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

2007-03-07 Thread vlendec
Author: vlendec
Date: 2007-03-07 21:13:51 + (Wed, 07 Mar 2007)
New Revision: 21753

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21753

Log:
Enable building ndrdump with the builtin popt. Jelmer, please check!
Modified:
   branches/SAMBA_3_0/source/Makefile.in


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2007-03-07 20:58:51 UTC (rev 
21752)
+++ branches/SAMBA_3_0/source/Makefile.in   2007-03-07 21:13:51 UTC (rev 
21753)
@@ -723,7 +723,7 @@
 NDRDUMP_OBJ = librpc/tools/ndrdump.o \
  $(PARAM_OBJ) $(LIBNDR_OBJ) $(LIBNDR_GEN_OBJ) \
  $(LIBSAMBA_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
- $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) $(POPT_OBJ) 
$(SECRETS_OBJ)
+ $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) $(SECRETS_OBJ)
 
 RPCTORTURE_OBJ = torture/rpctorture.o \
  rpcclient/display.o \



svn commit: samba r21752 - in branches/SAMBA_3_0_25/source/smbd: .

2007-03-07 Thread vlendec
Author: vlendec
Date: 2007-03-07 20:58:51 + (Wed, 07 Mar 2007)
New Revision: 21752

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21752

Log:
Merge the cosmetic changes
Modified:
   branches/SAMBA_3_0_25/source/smbd/nttrans.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/smbd/nttrans.c
===
--- branches/SAMBA_3_0_25/source/smbd/nttrans.c 2007-03-07 20:33:15 UTC (rev 
21751)
+++ branches/SAMBA_3_0_25/source/smbd/nttrans.c 2007-03-07 20:58:51 UTC (rev 
21752)
@@ -469,7 +469,7 @@
SMB_OFF_T file_len = 0;
SMB_STRUCT_STAT sbuf;
int info = 0;
-   files_struct *fsp=NULL;
+   files_struct *fsp = NULL;
char *p = NULL;
struct timespec c_timespec;
struct timespec a_timespec;
@@ -491,7 +491,9 @@
(unsigned int)create_options,
(unsigned int)root_dir_fid ));
 
-   /* If it's an IPC, use the pipe handler. */
+   /*
+* If it's an IPC, use the pipe handler.
+*/
 
if (IS_IPC(conn)) {
if (lp_nt_pipe_support()) {
@@ -502,7 +504,7 @@
return(ERROR_DOS(ERRDOS,ERRnoaccess));
}
}
-   
+
if (create_options & FILE_OPEN_BY_FILE_ID) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
@@ -522,7 +524,7 @@
 
if(!dir_fsp) {
END_PROFILE(SMBntcreateX);
-   return(ERROR_DOS(ERRDOS,ERRbadfid));
+   return ERROR_DOS(ERRDOS,ERRbadfid);
}
 
if(!dir_fsp->is_directory) {
@@ -533,7 +535,7 @@
return ERROR_NT(status);
}
 
-   /* 
+   /*
 * Check to see if this is a mac fork of some kind.
 */
 
@@ -564,7 +566,7 @@
 * Ensure it ends in a '\'.
 */
 
-   if(fname[dir_name_len-1] != '\\' && fname[dir_name_len-1] != 
'/') {
+   if((fname[dir_name_len-1] != '\\') && (fname[dir_name_len-1] != 
'/')) {
pstrcat(fname, "/");
dir_name_len++;
}
@@ -582,7 +584,7 @@
return ERROR_NT(status);
}
 
-   /* 
+   /*
 * Check to see if this is a mac fork of some kind.
 */
 
@@ -664,19 +666,19 @@
}
}
 
-   /* 
+   /*
 * If it's a request for a directory open, deal with it separately.
 */
 
if(create_options & FILE_DIRECTORY_FILE) {
-   oplock_request = 0;
-   
+
/* Can't open a temp directory. IFS kit test. */
if (file_attributes & FILE_ATTRIBUTE_TEMPORARY) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
 
+   oplock_request = 0;
status = open_directory(conn, fname, &sbuf,
access_mask,
share_access,
@@ -695,7 +697,9 @@
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
}
+
} else {
+
/*
 * Ordinary file case.
 */
@@ -721,6 +725,7 @@
new_file_attributes,
oplock_request,
&info, &fsp);
+
if (!NT_STATUS_IS_OK(status)) { 
/* We cheat here. There are two cases we
 * care about. One is a directory rename,
@@ -773,7 +778,6 @@
return ERROR_NT(status);
}
} else {
-
restore_case_semantics(conn, file_attributes);
END_PROFILE(SMBntcreateX);
if (open_was_deferred(SVAL(inbuf,smb_mid))) {
@@ -786,7 +790,7 @@
}

restore_case_semantics(conn, file_attributes);
-   
+
file_len = sbuf.st_size;
fattr = dos_mode(conn,fname,&sbuf);
if(fattr == 0) {
@@ -827,11 +831,11 @@
 * and we granted one (by whatever means) - set the
 * correct bit for extended oplock reply.
 */
-   
+
if (oplock_request && lp_fake_oplocks(SNUM(conn))) {
extended_oplock_granted = True;
}
-   
+
if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) {
extended_oplock_granted = True;
}
@@ -871,8 +875,8 @@
SIVAL(p,0

svn commit: samba r21751 - in branches/SAMBA_4_0/source: . script/tests

2007-03-07 Thread abartlet
Author: abartlet
Date: 2007-03-07 20:33:15 + (Wed, 07 Mar 2007)
New Revision: 21751

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21751

Log:
These 2 tests pass for me, so add them to the standard test script.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/samba4-skip
   branches/SAMBA_4_0/source/script/tests/test_nbt.sh
   branches/SAMBA_4_0/source/script/tests/tests_all.sh
   branches/SAMBA_4_0/source/script/tests/tests_quick.sh


Changeset:
Modified: branches/SAMBA_4_0/source/samba4-skip
===
--- branches/SAMBA_4_0/source/samba4-skip   2007-03-07 19:45:22 UTC (rev 
21750)
+++ branches/SAMBA_4_0/source/samba4-skip   2007-03-07 20:33:15 UTC (rev 
21751)
@@ -17,5 +17,3 @@
 RAW-SCAN-EAMAX
 SMB2-LOCK
 SMB2-NOTIFY
-LOCAL-RESOLVE
-NBT-DGRAM

Modified: branches/SAMBA_4_0/source/script/tests/test_nbt.sh
===
--- branches/SAMBA_4_0/source/script/tests/test_nbt.sh  2007-03-07 19:45:22 UTC 
(rev 21750)
+++ branches/SAMBA_4_0/source/script/tests/test_nbt.sh  2007-03-07 20:33:15 UTC 
(rev 21751)
@@ -9,6 +9,8 @@
 fi
 
 SERVER="$1"
+USERNAME="$2"
+PASSWORD="$3"
 
 incdir=`dirname $0`
 . $incdir/test_functions.sh
@@ -24,7 +26,7 @@
 NBT_TESTS=`bin/smbtorture --list | grep ^NBT`
 
 for f in $NBT_TESTS; do
-testit "$f" bin/smbtorture $TORTURE_OPTIONS //$SERVER/_none_ $f
+testit "$f" bin/smbtorture $TORTURE_OPTIONS //$SERVER/_none_ $f 
-U$USERNAME%$PASSWORD 
 done
 
 testok $0 $failed

Modified: branches/SAMBA_4_0/source/script/tests/tests_all.sh
===
--- branches/SAMBA_4_0/source/script/tests/tests_all.sh 2007-03-07 19:45:22 UTC 
(rev 21750)
+++ branches/SAMBA_4_0/source/script/tests/tests_all.sh 2007-03-07 20:33:15 UTC 
(rev 21751)
@@ -1,7 +1,7 @@
 #!/bin/sh
  $SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD $CONFIGURATION
  $SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD
- $SRCDIR/script/tests/test_nbt.sh $SERVER
+ $SRCDIR/script/tests/test_nbt.sh $SERVER $USERNAME $PASSWORD
  $SRCDIR/script/tests/test_rpc.sh $SERVER $USERNAME $PASSWORD $DOMAIN
  $SRCDIR/script/tests/test_net.sh $SERVER $USERNAME $PASSWORD $DOMAIN
  $SRCDIR/script/tests/test_session_key.sh $SERVER $USERNAME $PASSWORD $DOMAIN 
$NETBIOSNAME

Modified: branches/SAMBA_4_0/source/script/tests/tests_quick.sh
===
--- branches/SAMBA_4_0/source/script/tests/tests_quick.sh   2007-03-07 
19:45:22 UTC (rev 21750)
+++ branches/SAMBA_4_0/source/script/tests/tests_quick.sh   2007-03-07 
20:33:15 UTC (rev 21751)
@@ -4,7 +4,7 @@
 
 $SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD $CONFIGURATION
 $SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD
-$SRCDIR/script/tests/test_nbt.sh $SERVER
+$SRCDIR/script/tests/test_nbt.sh $SERVER $USERNAME $PASSWORD
 $SRCDIR/script/tests/test_quick.sh //$SERVER/cifs $USERNAME $PASSWORD ""
 $SRCDIR/script/tests/test_rpc_quick.sh $SERVER $USERNAME $PASSWORD $DOMAIN
 #$SRCDIR/script/tests/test_cifsposix.sh //$SERVER/cifsposixtestshare $USERNAME 
$PASSWORD "" || totalfailed=`expr $totalfailed + $?`



svn commit: samba r21750 - in branches/SAMBA_3_0/source: client libsmb

2007-03-07 Thread jra
Author: jra
Date: 2007-03-07 19:45:22 + (Wed, 07 Mar 2007)
New Revision: 21750

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21750

Log:
Sync up with SAMBA_3_0_25. Only client changes are in libsmbclient
right now.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/client/client.c
   branches/SAMBA_3_0/source/libsmb/clifile.c


Changeset:
Modified: branches/SAMBA_3_0/source/client/client.c
===
--- branches/SAMBA_3_0/source/client/client.c   2007-03-07 19:43:00 UTC (rev 
21749)
+++ branches/SAMBA_3_0/source/client/client.c   2007-03-07 19:45:22 UTC (rev 
21750)
@@ -1714,8 +1714,39 @@
 }
 
 /
+ Wildcard delete some files.
 /
 
+static int cmd_wdel(void)
+{
+   pstring mask;
+   pstring buf;
+   uint16 attribute;
+
+   if (!next_token_nr(NULL,buf,NULL,sizeof(buf))) {
+   d_printf("wdel 0x \n");
+   return 1;
+   }
+
+   attribute = (uint16)strtol(buf, (char **)NULL, 16);
+
+   if (!next_token_nr(NULL,buf,NULL,sizeof(buf))) {
+   d_printf("wdel 0x \n");
+   return 1;
+   }
+
+   pstrcpy(mask,cur_dir);
+   pstrcat(mask,buf);
+
+   if (!cli_unlink_full(cli, mask, attribute)) {
+   d_printf("%s deleting remote files %s\n",cli_errstr(cli),mask);
+   }
+   return 0;
+}
+
+/
+/
+
 static int cmd_open(void)
 {
pstring mask;
@@ -3211,6 +3242,7 @@
   {"unlock",cmd_unlock,"unlock: remove a POSIX 
lock",{COMPL_REMOTE,COMPL_REMOTE}},
   {"volume",cmd_volume,"print the volume name",{COMPL_NONE,COMPL_NONE}},
   {"vuid",cmd_vuid,"change current vuid",{COMPL_NONE,COMPL_NONE}},
+  {"wdel",cmd_wdel,"  wildcard delete all matching 
files",{COMPL_REMOTE,COMPL_NONE}},
   {"logon",cmd_logon,"establish new logon",{COMPL_NONE,COMPL_NONE}},
   {"listconnect",cmd_list_connect,"list open 
connections",{COMPL_NONE,COMPL_NONE}},
   {"showconnect",cmd_show_connect,"display the current active 
connection",{COMPL_NONE,COMPL_NONE}},

Modified: branches/SAMBA_3_0/source/libsmb/clifile.c
===
--- branches/SAMBA_3_0/source/libsmb/clifile.c  2007-03-07 19:43:00 UTC (rev 
21749)
+++ branches/SAMBA_3_0/source/libsmb/clifile.c  2007-03-07 19:45:22 UTC (rev 
21750)
@@ -496,7 +496,7 @@
  Delete a file.
 /
 
-BOOL cli_unlink(struct cli_state *cli, const char *fname)
+BOOL cli_unlink_full(struct cli_state *cli, const char *fname, uint16 attrs)
 {
char *p;
 
@@ -509,7 +509,7 @@
SSVAL(cli->outbuf,smb_tid,cli->cnum);
cli_setup_packet(cli);
 
-   SSVAL(cli->outbuf,smb_vwv0,aSYSTEM | aHIDDEN);
+   SSVAL(cli->outbuf,smb_vwv0, attrs);
   
p = smb_buf(cli->outbuf);
*p++ = 4;  
@@ -529,6 +529,15 @@
 }
 
 /
+ Delete a file.
+/
+
+BOOL cli_unlink(struct cli_state *cli, const char *fname)
+{
+   return cli_unlink_full(cli, fname, aSYSTEM | aHIDDEN);
+}
+
+/
  Create a directory.
 /
 



svn commit: samba r21749 - in branches/SAMBA_3_0_25/source/libsmb: .

2007-03-07 Thread jra
Author: jra
Date: 2007-03-07 19:43:00 + (Wed, 07 Mar 2007)
New Revision: 21749

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21749

Log:
Merge from SAMBA_3_0 to fix dfs referrel link problems.
Sync up with 3.0.
Jeremy.

Modified:
   branches/SAMBA_3_0_25/source/libsmb/clidfs.c
   branches/SAMBA_3_0_25/source/libsmb/errormap.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/libsmb/clidfs.c
===
--- branches/SAMBA_3_0_25/source/libsmb/clidfs.c2007-03-07 14:25:07 UTC 
(rev 21748)
+++ branches/SAMBA_3_0_25/source/libsmb/clidfs.c2007-03-07 19:43:00 UTC 
(rev 21749)
@@ -354,13 +354,13 @@
have_ip = True;
 }
 
-/
- split a dfs path into the server and share name components
-/
+/**
+ split a dfs path into the server, share name, and extrapath components
+**/
 
-static void split_dfs_path( const char *nodepath, fstring server, fstring 
share )
+static void split_dfs_path( const char *nodepath, fstring server, fstring 
share, fstring extrapath )
 {
-   char *p;
+   char *p, *q;
pstring path;
 
pstrcpy( path, nodepath );
@@ -368,7 +368,7 @@
if ( path[0] != '\\' )
return;
 
-   p = strrchr_m( path, '\\' );
+   p = strchr_m( path + 1, '\\' );
 
if ( !p )
return;
@@ -376,6 +376,16 @@
*p = '\0';
p++;
 
+   /* Look for any extra/deep path */
+   q = strchr_m(p, '\\');
+   if (q != NULL) {
+   *q = '\0';
+   q++;
+   fstrcpy( extrapath, q );
+   } else {
+   fstrcpy( extrapath, '\0' );
+   }
+   
fstrcpy( share, p );
fstrcpy( server, &path[1] );
 }
@@ -576,13 +586,13 @@
size_t num_refs;
uint16 consumed;
struct cli_state *cli_ipc;
-   pstring fullpath, cleanpath;
+   pstring fullpath, cleanpath, extrapath;
int pathlen;
fstring server, share;
struct cli_state *newcli;
pstring newpath;
pstring newmount;
-   char *ppath;
+   char *ppath, *temppath = NULL;

SMB_STRUCT_STAT sbuf;
uint32 attributes;
@@ -637,8 +647,14 @@
consumed = MIN(pathlen, consumed );
pstrcpy( targetpath, &fullpath[consumed/2] );
 
-   split_dfs_path( refs[0].dfspath, server, share );
+   split_dfs_path( refs[0].dfspath, server, share, extrapath );
SAFE_FREE( refs );
+
+   if (strlen(extrapath) > 0) {
+   string_append(&temppath, extrapath);
+   string_append(&temppath, targetpath);
+   pstrcpy( targetpath, temppath );
+   }

/* open the connection to the target path */

@@ -690,6 +706,7 @@
pstring fullpath;
BOOL res;
uint16 cnum;
+   fstring newextrapath;

if ( !cli || !sharename )
return False;
@@ -725,7 +742,7 @@
return False;
}

-   split_dfs_path( refs[0].dfspath, newserver, newshare );
+   split_dfs_path( refs[0].dfspath, newserver, newshare, newextrapath );
 
/* check that this is not a self-referral */
 

Modified: branches/SAMBA_3_0_25/source/libsmb/errormap.c
===
--- branches/SAMBA_3_0_25/source/libsmb/errormap.c  2007-03-07 14:25:07 UTC 
(rev 21748)
+++ branches/SAMBA_3_0_25/source/libsmb/errormap.c  2007-03-07 19:43:00 UTC 
(rev 21749)
@@ -1511,7 +1511,6 @@
{ EACCES, ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED },
{ ENOENT, ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_NOT_FOUND },
{ ENOTDIR, ERRDOS, ERRbadpath,  NT_STATUS_NOT_A_DIRECTORY },
-   { ENAMETOOLONG, ERRDOS, 206, NT_STATUS_OBJECT_NAME_INVALID },
{ EIO, ERRHRD, ERRgeneral, NT_STATUS_IO_DEVICE_ERROR },
{ EBADF, ERRSRV, ERRsrverror, NT_STATUS_INVALID_HANDLE },
{ EINVAL, ERRSRV, ERRsrverror, NT_STATUS_INVALID_HANDLE },
@@ -1534,6 +1533,9 @@
 #ifdef EROFS
{ EROFS, ERRHRD, ERRnowrite, NT_STATUS_ACCESS_DENIED },
 #endif
+#ifdef ENAMETOOLONG
+   { ENAMETOOLONG, ERRDOS, 206, NT_STATUS_OBJECT_NAME_INVALID },
+#endif
 #ifdef EFBIG
{ EFBIG, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL },
 #endif



svn commit: samba r21748 - in branches/SAMBA_3_0/source/smbd: .

2007-03-07 Thread vlendec
Author: vlendec
Date: 2007-03-07 14:25:07 + (Wed, 07 Mar 2007)
New Revision: 21748

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21748

Log:
More cosmetic alignment. One change to call_nt_transact_create(): We were
asking open_file_ntcreate for a batch oplock if the client asked us to do so,
even if it did not ask for an oplock in the first place. Did not test it, but
I think this is bogus anyway.

Volker
Modified:
   branches/SAMBA_3_0/source/smbd/nttrans.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/nttrans.c
===
--- branches/SAMBA_3_0/source/smbd/nttrans.c2007-03-07 13:57:32 UTC (rev 
21747)
+++ branches/SAMBA_3_0/source/smbd/nttrans.c2007-03-07 14:25:07 UTC (rev 
21748)
@@ -491,7 +491,9 @@
(unsigned int)create_options,
(unsigned int)root_dir_fid ));
 
-   /* If it's an IPC, use the pipe handler. */
+   /*
+* If it's an IPC, use the pipe handler.
+*/
 
if (IS_IPC(conn)) {
if (lp_nt_pipe_support()) {
@@ -669,14 +671,14 @@
 */
 
if(create_options & FILE_DIRECTORY_FILE) {
-   oplock_request = 0;
-   
+
/* Can't open a temp directory. IFS kit test. */
if (file_attributes & FILE_ATTRIBUTE_TEMPORARY) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
 
+   oplock_request = 0;
status = open_directory(conn, fname, &sbuf,
access_mask,
share_access,
@@ -723,6 +725,7 @@
new_file_attributes,
oplock_request,
&info, &fsp);
+
if (!NT_STATUS_IS_OK(status)) { 
/* We cheat here. There are two cases we
 * care about. One is a directory rename,
@@ -775,7 +778,6 @@
return ERROR_NT(status);
}
} else {
-
restore_case_semantics(conn, file_attributes);
END_PROFILE(SMBntcreateX);
if (open_was_deferred(SVAL(inbuf,smb_mid))) {
@@ -788,7 +790,7 @@
}

restore_case_semantics(conn, file_attributes);
-   
+
file_len = sbuf.st_size;
fattr = dos_mode(conn,fname,&sbuf);
if(fattr == 0) {
@@ -873,8 +875,8 @@
SIVAL(p,0,info);
}
p += 4;
-   
-   /* Create time. */  
+
+   /* Create time. */
c_timespec = 
get_create_timespec(&sbuf,lp_fake_dir_create_times(SNUM(conn)));
a_timespec = get_atimespec(&sbuf);
m_timespec = get_mtimespec(&sbuf);
@@ -885,7 +887,7 @@
dos_filetime_timespec(&m_timespec);
}
 
-   put_long_date_timespec(p, c_timespec);
+   put_long_date_timespec(p, c_timespec); /* create time. */
p += 8;
put_long_date_timespec(p, a_timespec); /* access time */
p += 8;
@@ -1254,7 +1256,9 @@
}
 
oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
-   oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0;
+   if (oplock_request) {
+   oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK 
: 0;
+   }
 
/*
 * Ordinary file or directory.
@@ -1323,14 +1327,13 @@
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
 
-   oplock_request = 0;
-
/*
 * We will get a create directory here if the Win32
 * app specified a security descriptor in the 
 * CreateDirectory() call.
 */
 
+   oplock_request = 0;
status = open_directory(conn, fname, &sbuf,
access_mask,
share_access,



svn commit: samba r21747 - in branches/SAMBA_3_0/source/smbd: .

2007-03-07 Thread vlendec
Author: vlendec
Date: 2007-03-07 13:57:32 + (Wed, 07 Mar 2007)
New Revision: 21747

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21747

Log:
Cosmetic checkin to bring ntcreate and nttranscreate closer together
Modified:
   branches/SAMBA_3_0/source/smbd/nttrans.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/nttrans.c
===
--- branches/SAMBA_3_0/source/smbd/nttrans.c2007-03-07 11:42:21 UTC (rev 
21746)
+++ branches/SAMBA_3_0/source/smbd/nttrans.c2007-03-07 13:57:32 UTC (rev 
21747)
@@ -469,7 +469,7 @@
SMB_OFF_T file_len = 0;
SMB_STRUCT_STAT sbuf;
int info = 0;
-   files_struct *fsp=NULL;
+   files_struct *fsp = NULL;
char *p = NULL;
struct timespec c_timespec;
struct timespec a_timespec;
@@ -502,7 +502,7 @@
return(ERROR_DOS(ERRDOS,ERRnoaccess));
}
}
-   
+
if (create_options & FILE_OPEN_BY_FILE_ID) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
@@ -522,7 +522,7 @@
 
if(!dir_fsp) {
END_PROFILE(SMBntcreateX);
-   return(ERROR_DOS(ERRDOS,ERRbadfid));
+   return ERROR_DOS(ERRDOS,ERRbadfid);
}
 
if(!dir_fsp->is_directory) {
@@ -533,7 +533,7 @@
return ERROR_NT(status);
}
 
-   /* 
+   /*
 * Check to see if this is a mac fork of some kind.
 */
 
@@ -564,7 +564,7 @@
 * Ensure it ends in a '\'.
 */
 
-   if(fname[dir_name_len-1] != '\\' && fname[dir_name_len-1] != 
'/') {
+   if((fname[dir_name_len-1] != '\\') && (fname[dir_name_len-1] != 
'/')) {
pstrcat(fname, "/");
dir_name_len++;
}
@@ -582,7 +582,7 @@
return ERROR_NT(status);
}
 
-   /* 
+   /*
 * Check to see if this is a mac fork of some kind.
 */
 
@@ -664,7 +664,7 @@
}
}
 
-   /* 
+   /*
 * If it's a request for a directory open, deal with it separately.
 */
 
@@ -695,7 +695,9 @@
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
}
+
} else {
+
/*
 * Ordinary file case.
 */
@@ -827,11 +829,11 @@
 * and we granted one (by whatever means) - set the
 * correct bit for extended oplock reply.
 */
-   
+
if (oplock_request && lp_fake_oplocks(SNUM(conn))) {
extended_oplock_granted = True;
}
-   
+
if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) {
extended_oplock_granted = True;
}
@@ -1255,9 +1257,13 @@
oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0;
 
/*
+* Ordinary file or directory.
+*/
+   
+   /*
 * Check if POSIX semantics are wanted.
 */
-
+   
new_file_attributes = set_posix_case_semantics(conn, file_attributes);
 
RESOLVE_DFSPATH(fname, conn, inbuf, outbuf);
@@ -1273,7 +1279,7 @@
restore_case_semantics(conn, file_attributes);
return ERROR_NT(status);
}
-
+
/* This is the correct thing to do (check every time) but can_delete is
   expensive (it may have to read the parent directory permissions). So
   for now we're not doing it unless we have a strong hint the client
@@ -1464,11 +1470,11 @@
 * and we granted one (by whatever means) - set the
 * correct bit for extended oplock reply.
 */
-
+
if (oplock_request && lp_fake_oplocks(SNUM(conn))) {
extended_oplock_granted = True;
}
-  
+
if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) {
extended_oplock_granted = True;
}



Re: Rev 11686: Use smbtorture for enumerating tests. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-03-07 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jelmer Vernooij schrieb:
> At file:///home/jelmer/bzr.samba/SAMBA_4_0/
> -NBT_TESTS="NBT-REGISTER NBT-WINS"
> -NBT_TESTS="$NBT_TESTS NBT-WINSREPLICATION"
> -# NBT_TESTS="$NBT_TESTS NBT-WINSREPLICATION-OWNED"
> -NBT_TESTS="$NBT_TESTS NET-API-LOOKUP NET-API-LOOKUPHOST NET-API-LOOKUPPDC"
> +NBT_TESTS=`bin/smbtorture --list | grep ^NBT`

are the NET-API- tests listed somewhere else now?

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

iD8DBQFF7rLBm70gjA5TCD8RApURAJ9f0znS1Sva4QK8iCnvO8qsNGX3UgCdEIRb
mAlEbJKJPJaLTaV6C1TslkM=
=dcBT
-END PGP SIGNATURE-


svn commit: samba r21746 - in branches/SAMBA_4_0/source/heimdal/kdc: .

2007-03-07 Thread abartlet
Author: abartlet
Date: 2007-03-07 11:42:21 + (Wed, 07 Mar 2007)
New Revision: 21746

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21746

Log:
We don't link in this file any more.

Removed:
   branches/SAMBA_4_0/source/heimdal/kdc/config.c


Changeset:
Deleted: branches/SAMBA_4_0/source/heimdal/kdc/config.c
===
--- branches/SAMBA_4_0/source/heimdal/kdc/config.c  2007-03-07 11:35:06 UTC 
(rev 21745)
+++ branches/SAMBA_4_0/source/heimdal/kdc/config.c  2007-03-07 11:42:21 UTC 
(rev 21746)
@@ -1,359 +0,0 @@
-/*
- * Copyright (c) 1997-2005 Kungliga Tekniska H�gskolan
- * (Royal Institute of Technology, Stockholm, Sweden). 
- *
- * All rights reserved. 
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions 
- * are met: 
- *
- * 1. Redistributions of source code must retain the above copyright 
- *notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright 
- *notice, this list of conditions and the following disclaimer in the 
- *documentation and/or other materials provided with the distribution. 
- *
- * 3. Neither the name of the Institute nor the names of its contributors 
- *may be used to endorse or promote products derived from this software 
- *without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
- * SUCH DAMAGE. 
- */
-
-#include "kdc_locl.h"
-#include 
-#include 
-
-RCSID("$Id: config.c,v 1.82 2007/01/03 18:52:45 lha Exp $");
-
-struct dbinfo {
-char *realm;
-char *dbname;
-char *mkey_file;
-struct dbinfo *next;
-};
-
-static const char *config_file;/* location of kdc config file */
-static char *max_request_str;  /* `max_request' as a string */
-
-static int builtin_hdb_flag;
-static int help_flag;
-static int version_flag;
-
-static struct getarg_strings addresses_str;/* addresses to listen on */
-
-static struct getargs args[] = {
-{ 
-   "config-file",  'c',arg_string, &config_file, 
-   "location of config file",  "file" 
-},
-{ 
-   "require-preauth",  'p',arg_negative_flag, &require_preauth, 
-   "don't require pa-data in as-reqs"
-},
-{ 
-   "max-request",  0,  arg_string, &max_request, 
-   "max size for a kdc-request", "size"
-},
-{ "enable-http", 'H', arg_flag, &enable_http, "turn on HTTP support" },
-{  "524",  0,  arg_negative_flag, &enable_524,
-   "don't respond to 524 requests" 
-},
-{
-   "kaserver", 'K', arg_flag,   &enable_kaserver,
-   "enable kaserver support"
-},
-{  "kerberos4",0,  arg_flag, &enable_v4,
-   "respond to kerberos 4 requests" 
-},
-{ 
-   "v4-realm", 'r',arg_string, &v4_realm, 
-   "realm to serve v4-requests for"
-},
-{  "kerberos4-cross-realm",0,  arg_flag,
-   &enable_v4_cross_realm,
-   "respond to kerberos 4 requests from foreign realms" 
-},
-{  "ports",'P',arg_string, &port_str,
-   "ports to listen to", "portspec"
-},
-#if DETACH_IS_DEFAULT
-{
-   "detach",   'D',  arg_negative_flag, &detach_from_console, 
-   "don't detach from console"
-},
-#else
-{
-   "detach",   0 ,  arg_flag, &detach_from_console, 
-   "detach from console"
-},
-#endif
-{  "addresses",0,  arg_strings, &addresses_str,
-   "addresses to listen on", "list of addresses" },
-{  "disable-des",  0,  arg_flag, &disable_des,
-   "disable DES" },
-{  "builtin-hdb",  0,  arg_flag,   &builtin_hdb_flag,
-   "list builtin hdb backends"},
-{  "help", 'h',arg_flag,   &help_flag },
-{  "version",  'v',arg_flag,   &version_flag }
-};
-
-static int num_args = sizeof(args) / sizeof(args[0]);
-
-static void
-usage(int ret)
-{
-arg_printusage (args, num_args, NULL, "");
-exit (ret);
-}
-
-static void
-get_dbinfo(krb5_context context, krb5_kdc_configuration *config)
-{
-const krb5_config_bin

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

2007-03-07 Thread abartlet
Author: abartlet
Date: 2007-03-07 11:35:06 + (Wed, 07 Mar 2007)
New Revision: 21745

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21745

Log:
indent

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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/torture.c
===
--- branches/SAMBA_4_0/source/torture/torture.c 2007-03-07 11:15:44 UTC (rev 
21744)
+++ branches/SAMBA_4_0/source/torture/torture.c 2007-03-07 11:35:06 UTC (rev 
21745)
@@ -62,7 +62,7 @@
init_module_fn *shared_init = load_samba_modules(NULL, "torture");
 
torture_root = talloc_zero(talloc_autofree_context(), 
-   struct torture_suite);
+  struct torture_suite);

run_init_functions(static_init);
run_init_functions(shared_init);



svn commit: samba r21744 - in branches/SAMBA_4_0/source/rpc_server/echo: .

2007-03-07 Thread abartlet
Author: abartlet
Date: 2007-03-07 11:15:44 + (Wed, 07 Mar 2007)
New Revision: 21744

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21744

Log:
Test more talloc failure cases.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/rpc_server/echo/rpc_echo.c


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/echo/rpc_echo.c
===
--- branches/SAMBA_4_0/source/rpc_server/echo/rpc_echo.c2007-03-07 
11:05:59 UTC (rev 21743)
+++ branches/SAMBA_4_0/source/rpc_server/echo/rpc_echo.c2007-03-07 
11:15:44 UTC (rev 21744)
@@ -72,7 +72,9 @@
 static NTSTATUS dcesrv_echo_TestCall(struct dcesrv_call_state *dce_call, 
TALLOC_CTX *mem_ctx, struct echo_TestCall *r)
 {
*r->out.s2 = talloc_strdup(mem_ctx, r->in.s1);
-   
+   if (r->in.s1 && !*r->out.s2) {
+   return NT_STATUS_NO_MEMORY;
+   }
return NT_STATUS_OK;
 }
 
@@ -134,6 +136,9 @@
}
r->out.data->x = 2 * r->in.data->x;
r->out.data->surrounding = talloc_zero_array(mem_ctx, uint16_t, 
r->out.data->x);
+   if (!r->out.data->surrounding) {
+   return NT_STATUS_NO_MEMORY;
+   }
 
return NT_STATUS_OK;
 }



svn commit: samba r21743 - in branches/SAMBA_4_0/source/script/tests: .

2007-03-07 Thread abartlet
Author: abartlet
Date: 2007-03-07 11:05:59 + (Wed, 07 Mar 2007)
New Revision: 21743

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21743

Log:
Always use the 'escaped' LDAPI path.

Wait around for the server to start, so we don't try to contact it
during it's starup phase.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/script/tests/Samba4.pm
   branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/Samba4.pm
===
--- branches/SAMBA_4_0/source/script/tests/Samba4.pm2007-03-07 10:29:39 UTC 
(rev 21742)
+++ branches/SAMBA_4_0/source/script/tests/Samba4.pm2007-03-07 11:05:59 UTC 
(rev 21743)
@@ -13,9 +13,10 @@
 use FindBin qw($RealBin);
 use POSIX;
 
-sub slapd_start($$)
+sub slapd_start($$$)
 {
-   my ($conf, $uri, $loglevel) = @_;
+my $count = 0;
+   my ($bindir, $conf, $uri) = @_;
# running slapd in the background means it stays in the same process 
group, so it can be
# killed by timelimit
if (defined($ENV{FEDORA_DS_PREFIX})) {
@@ -26,6 +27,14 @@
system("slapd -d$ENV{OPENLDAP_LOGLEVEL} -f $conf -h $uri > 
$ENV{LDAPDIR}/logs 2>&1 &");
$ENV{PATH} = $oldpath;
}
+   while (system("$bindir/ldbsearch -H $uri -s base -b \"\" 
supportedLDAPVersion > /dev/null") != 0) {
+   $count++;
+   if ($count > 10) {
+   slapd_stop();
+   return 0;
+   }
+   sleep(1);
+   }
return 1;
 }
 
@@ -103,7 +112,6 @@
 {
# give time for nbt server to register its names
print "delaying for nbt name registration\n";
-   sleep(4);
 
# This will return quickly when things are up, but be slow if we 
# need to wait for (eg) SSL init 
@@ -113,6 +121,8 @@
system("bin/nmblookup $ENV{CONFIGURATION} -U $ENV{SERVER} 
$ENV{NETBIOSNAME}");
system("bin/nmblookup $ENV{CONFIGURATION} $ENV{NETBIOSNAME}");
system("bin/nmblookup $ENV{CONFIGURATION} -U $ENV{SERVER} 
$ENV{NETBIOSNAME}");
+   system("bin/nmblookup $ENV{CONFIGURATION} $ENV{NETBIOSNAME}");
+   system("bin/nmblookup $ENV{CONFIGURATION} -U $ENV{SERVER} 
$ENV{NETBIOSNAME}");
 }
 
 sub provision($)

Modified: branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh
===
--- branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh  2007-03-07 
10:29:39 UTC (rev 21742)
+++ branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh  2007-03-07 
11:05:59 UTC (rev 21743)
@@ -65,8 +65,6 @@
 
 $srcdir/bin/ad2oLschema $CONFIGURATION -H $PRIVATEDIR/sam.ldb 
--option=convert:target=fedora-ds -I $srcdir/setup/schema-map-fedora-ds-1.0 -O 
$FEDORA_DS_DIR/schema/99_ad.ldif >&2
 
-LDAP_URI_ESCAPE="ldapi://"`echo $LDAPDIR/ldapi | sed 's|/|%2F|g'`
-
 PROVISION_OPTIONS="$PROVISION_OPTIONS --ldap-module=nsuniqueid"
 #it is easier to base64 encode this than correctly escape it:
 # (targetattr = "*") (version 3.0;acl "full access to all by all";allow 
(all)(userdn = "ldap:///anyone";);)



svn commit: samba r21742 - in branches/SAMBA_4_0/source/script/tests: .

2007-03-07 Thread tridge
Author: tridge
Date: 2007-03-07 10:29:39 + (Wed, 07 Mar 2007)
New Revision: 21742

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21742

Log:

reenable the smbclient test now that the d_printf bug is fixed

Modified:
   branches/SAMBA_4_0/source/script/tests/test_blackbox.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/test_blackbox.sh
===
--- branches/SAMBA_4_0/source/script/tests/test_blackbox.sh 2007-03-07 
10:17:50 UTC (rev 21741)
+++ branches/SAMBA_4_0/source/script/tests/test_blackbox.sh 2007-03-07 
10:29:39 UTC (rev 21742)
@@ -20,9 +20,7 @@
 incdir=`dirname $0`
 . $incdir/test_functions.sh
 
-# skip the smbclient test until jelmer can work on it. Right now the
-# test makes no sense at all with the new test system (tridge) testit
-# "smbclient" $incdir/../../../testprogs/blackbox/test_smbclient.sh "$SERVER" 
"$USERNAME" "$PASSWORD" "$DOMAIN" "$PREFIX" "$ADDARGS"
+testit "smbclient" $incdir/../../../testprogs/blackbox/test_smbclient.sh 
"$SERVER" "$USERNAME" "$PASSWORD" "$DOMAIN" "$PREFIX" "$ADDARGS"
 testit "cifsdd" $incdir/../../../testprogs/blackbox/test_cifsdd.sh "$SERVER" 
"$USERNAME" "$PASSWORD" "$DOMAIN" "$ADDARGS"
 
 testok $0 $failed



svn commit: samba r21741 - in branches/SAMBA_4_0/source/script/tests: .

2007-03-07 Thread abartlet
Author: abartlet
Date: 2007-03-07 10:17:50 + (Wed, 07 Mar 2007)
New Revision: 21741

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21741

Log:
Like starting smbd, ensure we have acutally started slapd, and it is
listening, before we continue.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/script/tests/mktestsetup.sh
   branches/SAMBA_4_0/source/script/tests/selftest.pl


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/mktestsetup.sh
===
--- branches/SAMBA_4_0/source/script/tests/mktestsetup.sh   2007-03-07 
10:00:14 UTC (rev 21740)
+++ branches/SAMBA_4_0/source/script/tests/mktestsetup.sh   2007-03-07 
10:17:50 UTC (rev 21741)
@@ -255,8 +255,7 @@
 PROVISION_OPTIONS="$PROVISION_OPTIONS --simple-bind-dn=cn=Manager,$BASEDN 
--password=$PASSWORD --root=$ROOT"
 $srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS >&2
 
-LDAP_URI="ldapi://$LDAPDIR/ldapi"
-LDAP_URI_ESCAPE="ldapi://"`echo $LDAPDIR/ldapi | sed 's|/|%2F|g'`
+LDAP_URI="ldapi://"`echo $LDAPDIR/ldapi | sed 's|/|%2F|g'`
 
 . `dirname $0`/mk-openldap.sh
 
@@ -287,7 +286,6 @@
 echo "SERVER=$SERVER"
 echo "NETBIOSNAME=$NETBIOSNAME"
 echo "LDAP_URI=$LDAP_URI"
-echo "LDAP_URI_ESCAPE=$LDAP_URI_ESCAPE"
 echo "DOMAIN=$DOMAIN"
 echo "USERNAME=$USERNAME"
 echo "REALM=$REALM"

Modified: branches/SAMBA_4_0/source/script/tests/selftest.pl
===
--- branches/SAMBA_4_0/source/script/tests/selftest.pl  2007-03-07 10:00:14 UTC 
(rev 21740)
+++ branches/SAMBA_4_0/source/script/tests/selftest.pl  2007-03-07 10:17:50 UTC 
(rev 21741)
@@ -418,7 +418,7 @@
 
 # Start slapd before smbd
 if ($ldap) {
-   Samba4::slapd_start($ENV{SLAPD_CONF}, $ENV{LDAP_URI_ESCAPE}) or 
die("couldn't start slapd");
+   Samba4::slapd_start($bindir, $ENV{SLAPD_CONF}, $ENV{LDAP_URI}) or 
die("couldn't start slapd");
 
 print "LDAP PROVISIONING...";
Samba4::provision_ldap($bindir, $setupdir);



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

2007-03-07 Thread tridge
Author: tridge
Date: 2007-03-07 10:00:14 + (Wed, 07 Mar 2007)
New Revision: 21740

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21740

Log:

this fixes the real cause of the large log files we had. The problem
was we were not checking the result of a convert_string() call, and it
was giving -1. We then passed -1 to fwrite() on stdout, which on aix
and macosx wrote all of available memory to stdout :)

To fix this, replace non-printing chars with ? in d_printf if the
string cannot be converted

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/util/dprintf.c
===
--- branches/SAMBA_4_0/source/lib/util/dprintf.c2007-03-07 05:29:12 UTC 
(rev 21739)
+++ branches/SAMBA_4_0/source/lib/util/dprintf.c2007-03-07 10:00:14 UTC 
(rev 21740)
@@ -30,6 +30,7 @@
 */
 
 #include "includes.h"
+#include "system/locale.h"
 
 _PUBLIC_ int d_vfprintf(FILE *f, const char *format, va_list ap) 
_PRINTF_ATTRIBUTE(2,0)
 {
@@ -54,7 +55,23 @@
return -1;
}
clen = convert_string(CH_UNIX, CH_DISPLAY, p, ret, p2, maxlen);
+if (clen == -1) {
+   /* the string can't be converted - do the best we can,
+  filling in non-printing chars with '?' */
+   int i;
+   for (i=0;i= maxlen) {
/* it didn't fit - try a larger buffer */
maxlen *= 2;