[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-768-g5c392c4

Volker Lendecke vl at samba.org
Fri Dec 21 11:09:21 GMT 2007


The branch, v3-2-test has been updated
       via  5c392c4c6e277a24d0d477902dc7856b2b46ee53 (commit)
       via  5ab82d4f574f2a2e2761e9e414c66a70aeffb05d (commit)
       via  c31c7e3e24875ce75bc18f0ad7529320eab8e50a (commit)
       via  7e1d9b561f6df233b8c7eaec83d1e4207b5a2fb0 (commit)
       via  93e5de23e7109432f554745b18c6d630a39f9c2b (commit)
       via  7e193c68b2a7eb16afc12379a4ceed41053d1eeb (commit)
       via  c19363eb77fcc3e1bf3341e6373d38f1e91fc08f (commit)
       via  4b06c68482247d859ec30b8b1920706e43358989 (commit)
       via  86d9412611fd99c21e15c71d30a3f95e35d8535b (commit)
       via  032c5589fe7f9f2fcb0f336e72517a81a720b6ce (commit)
       via  ea0e5ad9a15c848904dee8cb2d3e392b6a894705 (commit)
       via  c131d0dc52ec09c9227eff3d68877369c37aaed5 (commit)
      from  e18fab269c7370a6670c56eeab60fd90feecf0b2 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 5c392c4c6e277a24d0d477902dc7856b2b46ee53
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 20 22:27:01 2007 +0100

    Some C++ fixes

commit 5ab82d4f574f2a2e2761e9e414c66a70aeffb05d
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 20 22:17:16 2007 +0100

    Some C++ warnings

commit c31c7e3e24875ce75bc18f0ad7529320eab8e50a
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 20 21:25:00 2007 +0100

    Fix a C++ warning

commit 7e1d9b561f6df233b8c7eaec83d1e4207b5a2fb0
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 20 20:59:44 2007 +0100

    Fix a C++ warning

commit 93e5de23e7109432f554745b18c6d630a39f9c2b
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 20 20:59:27 2007 +0100

    Fix a missing prototype warning

commit 7e193c68b2a7eb16afc12379a4ceed41053d1eeb
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Dec 9 18:25:34 2007 +0100

    Remove some statics from md4.c

commit c19363eb77fcc3e1bf3341e6373d38f1e91fc08f
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 20 16:05:57 2007 +0100

    Add a singleton cache
    
    First user is yp_default_domain

commit 4b06c68482247d859ec30b8b1920706e43358989
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 20 15:16:25 2007 +0100

    Make data_blob_string_const return null terminated strings
    
    ... nobody was using it, so we're free to change it now :-)

commit 86d9412611fd99c21e15c71d30a3f95e35d8535b
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Dec 19 21:59:28 2007 +0100

    Remove next_token_nr_talloc and its associated global
    
    Only client.c and clitar.c used this, I think they should carry the static
    themselves. Also move the a bit funny routine toktocliplist to clitar.c, the
    only place where it is used.

commit 032c5589fe7f9f2fcb0f336e72517a81a720b6ce
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 20 14:54:33 2007 +0100

    Convert the pwnam cache to memcache

commit ea0e5ad9a15c848904dee8cb2d3e392b6a894705
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 20 14:41:58 2007 +0100

    Add memcache_add_talloc
    
    The first memcache API only had blobs, but we have quite a few objects that are
    more complex talloc'ed structues. The current one I'm looking at is the
    getpwnam cache, but there are others around.

commit c131d0dc52ec09c9227eff3d68877369c37aaed5
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 20 10:55:45 2007 +0100

    Add a global cache
    
    It hurts, but I think this global variable is necessary for transition, and it
    has the potential to remove quite a few other global variables without messing
    with APIs too much.

-----------------------------------------------------------------------

Summary of changes:
 source/client/client.c                     |  139 ++++++++++++++--------------
 source/client/clitar.c                     |   60 +++++++++++-
 source/include/memcache.h                  |   13 ++-
 source/lib/access.c                        |   20 ++++-
 source/lib/data_blob.c                     |    2 +-
 source/lib/md4.c                           |   20 +++--
 source/lib/memcache.c                      |   88 ++++++++++++++++++
 source/lib/netapi/joindomain.c             |    1 +
 source/lib/secace.c                        |    5 +-
 source/lib/secacl.c                        |    3 +-
 source/lib/secdesc.c                       |   12 ++-
 source/lib/sharesec.c                      |   10 ++-
 source/lib/socket_wrapper/socket_wrapper.c |    4 +-
 source/lib/time.c                          |    4 +-
 source/lib/util_pw.c                       |   68 +++-----------
 source/lib/util_seaccess.c                 |    4 +-
 source/lib/util_str.c                      |   77 ---------------
 source/libsmb/clientgen.c                  |    4 +-
 source/param/loadparm.c                    |    2 +-
 source/rpc_server/srv_dfs_nt.c             |    2 +-
 source/rpc_server/srv_lsa_nt.c             |    4 +-
 source/rpc_server/srv_samr_nt.c            |    4 +-
 source/rpc_server/srv_srvsvc_nt.c          |    2 +-
 source/rpc_server/srv_svcctl_nt.c          |    4 +-
 source/rpc_server/srv_winreg_nt.c          |    6 +-
 source/rpc_server/srv_wkssvc_nt.c          |    2 +-
 source/services/services_db.c              |    4 +-
 source/smbd/posix_acls.c                   |    6 +-
 source/smbd/reply.c                        |    4 +-
 source/smbd/server.c                       |    6 +
 source/smbd/vfs.c                          |    2 +-
 31 files changed, 332 insertions(+), 250 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/client.c b/source/client/client.c
index 97d7cf0..f761d92 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -41,6 +41,7 @@ static char *desthost;
 static char *calling_name;
 static bool grepable = false;
 static char *cmdstr = NULL;
+static const char *cmd_ptr = NULL;
 
 static int io_bufsize = 64512;
 
@@ -425,7 +426,7 @@ static int cmd_cd(void)
 	char *buf = NULL;
 	int rc = 0;
 
-	if (next_token_nr_talloc(talloc_tos(), NULL, &buf,NULL)) {
+	if (next_token_talloc(talloc_tos(), &cmd_ptr, &buf,NULL)) {
 		rc = do_cd(buf);
 	} else {
 		d_printf("Current directory is %s\n",client_get_cur_dir());
@@ -863,7 +864,7 @@ static int cmd_dir(void)
 		return 1;
 	}
 
-	if (next_token_nr_talloc(ctx, NULL,&buf,NULL)) {
+	if (next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		string_replace(buf,'/','\\');
 		if (*buf == CLI_DIRSEP_CHAR) {
 			mask = talloc_strdup(ctx, buf + 1);
@@ -915,7 +916,7 @@ static int cmd_du(void)
 		}
 	}
 
-	if (next_token_nr_talloc(ctx, NULL,&buf,NULL)) {
+	if (next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		string_replace(buf,'/','\\');
 		if (*buf == CLI_DIRSEP_CHAR) {
 			mask = talloc_strdup(ctx, buf);
@@ -941,8 +942,8 @@ static int cmd_echo(void)
 	char *num;
 	char *data;
 
-	if (!next_token_nr_talloc(ctx, NULL, &num, NULL)
-	    || !next_token_nr_talloc(ctx, NULL, &data, NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr, &num, NULL)
+	    || !next_token_talloc(ctx, &cmd_ptr, &data, NULL)) {
 		d_printf("echo <num> <data>\n");
 		return 1;
 	}
@@ -1116,7 +1117,7 @@ static int cmd_get(void)
 		return 1;
 	}
 
-	if (!next_token_nr_talloc(ctx, NULL,&fname,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&fname,NULL)) {
 		d_printf("get <filename> [localname]\n");
 		return 1;
 	}
@@ -1129,7 +1130,7 @@ static int cmd_get(void)
 		return 1;
 	}
 
-	next_token_nr_talloc(ctx, NULL,&lname,NULL);
+	next_token_talloc(ctx, &cmd_ptr,&lname,NULL);
 	if (!lname) {
 		lname = fname;
 	}
@@ -1277,7 +1278,7 @@ static int cmd_more(void)
 	}
 	close(fd);
 
-	if (!next_token_nr_talloc(ctx,NULL,&fname,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&fname,NULL)) {
 		d_printf("more <filename>\n");
 		unlink(lname);
 		return 1;
@@ -1325,7 +1326,7 @@ static int cmd_mget(void)
 
 	abort_mget = false;
 
-	while (next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	while (next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		mget_mask = talloc_strdup(ctx, client_get_cur_dir());
 		if (!mget_mask) {
 			return 1;
@@ -1442,7 +1443,7 @@ static int cmd_mkdir(void)
 		return 1;
 	}
 
-	if (!next_token_nr_talloc(ctx, NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		if (!recurse) {
 			d_printf("mkdir <dirname>\n");
 		}
@@ -1511,7 +1512,7 @@ static int cmd_altname(void)
 		return 1;
 	}
 
-	if (!next_token_nr_talloc(ctx, NULL, &buf, NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr, &buf, NULL)) {
 		d_printf("altname <file>\n");
 		return 1;
 	}
@@ -1677,12 +1678,12 @@ static int cmd_put(void)
 		return 1;
 	}
 
-	if (!next_token_nr_talloc(ctx,NULL,&lname,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&lname,NULL)) {
 		d_printf("put <filename>\n");
 		return 1;
 	}
 
-	if (next_token_nr_talloc(ctx, NULL,&buf,NULL)) {
+	if (next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		rname = talloc_asprintf_append(rname, buf);
 	} else {
 		rname = talloc_asprintf_append(rname, lname);
@@ -1762,7 +1763,7 @@ static int cmd_select(void)
 {
 	TALLOC_CTX *ctx = talloc_tos();
 	char *new_fs = NULL;
-	next_token_nr_talloc(ctx, NULL,&new_fs,NULL)
+	next_token_talloc(ctx, &cmd_ptr,&new_fs,NULL)
 		;
 	if (new_fs) {
 		client_set_fileselection(new_fs);
@@ -1848,7 +1849,7 @@ static int cmd_mput(void)
 	TALLOC_CTX *ctx = talloc_tos();
 	char *p = NULL;
 
-	while (next_token_nr_talloc(ctx, NULL,&p,NULL)) {
+	while (next_token_talloc(ctx, &cmd_ptr,&p,NULL)) {
 		int ret;
 		struct file_list *temp_list;
 		char *quest, *lname, *rname;
@@ -1959,14 +1960,14 @@ static int cmd_cancel(void)
 	char *buf = NULL;
 	int job;
 
-	if (!next_token_nr_talloc(ctx, NULL, &buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr, &buf,NULL)) {
 		d_printf("cancel <jobid> ...\n");
 		return 1;
 	}
 	do {
 		job = atoi(buf);
 		do_cancel(job);
-	} while (next_token_nr_talloc(ctx,NULL,&buf,NULL));
+	} while (next_token_talloc(ctx, &cmd_ptr,&buf,NULL));
 
 	return 0;
 }
@@ -1982,7 +1983,7 @@ static int cmd_print(void)
 	char *rname = NULL;
 	char *p = NULL;
 
-	if (!next_token_nr_talloc(ctx, NULL, &lname,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr, &lname,NULL)) {
 		d_printf("print <filename>\n");
 		return 1;
 	}
@@ -2078,7 +2079,7 @@ static int cmd_del(void)
 	if (!mask) {
 		return 1;
 	}
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("del <filename>\n");
 		return 1;
 	}
@@ -2104,14 +2105,14 @@ static int cmd_wdel(void)
 	struct cli_state *targetcli;
 	char *targetname = NULL;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("wdel 0x<attrib> <wcard>\n");
 		return 1;
 	}
 
 	attribute = (uint16)strtol(buf, (char **)NULL, 16);
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("wdel 0x<attrib> <wcard>\n");
 		return 1;
 	}
@@ -2146,7 +2147,7 @@ static int cmd_open(void)
 	struct cli_state *targetcli;
 	int fnum;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("open <filename>\n");
 		return 1;
 	}
@@ -2190,7 +2191,7 @@ static int cmd_posix_open(void)
 	mode_t mode;
 	int fnum;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("posix_open <filename> 0<mode>\n");
 		return 1;
 	}
@@ -2202,7 +2203,7 @@ static int cmd_posix_open(void)
 		return 1;
 	}
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("posix_open <filename> 0<mode>\n");
 		return 1;
 	}
@@ -2238,7 +2239,7 @@ static int cmd_posix_mkdir(void)
 	mode_t mode;
 	int fnum;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("posix_mkdir <filename> 0<mode>\n");
 		return 1;
 	}
@@ -2250,7 +2251,7 @@ static int cmd_posix_mkdir(void)
 		return 1;
 	}
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("posix_mkdir <filename> 0<mode>\n");
 		return 1;
 	}
@@ -2278,7 +2279,7 @@ static int cmd_posix_unlink(void)
 	char *targetname = NULL;
 	struct cli_state *targetcli;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("posix_unlink <filename>\n");
 		return 1;
 	}
@@ -2312,7 +2313,7 @@ static int cmd_posix_rmdir(void)
 	char *targetname = NULL;
 	struct cli_state *targetcli;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("posix_rmdir <filename>\n");
 		return 1;
 	}
@@ -2344,7 +2345,7 @@ static int cmd_close(void)
 	char *buf = NULL;
 	int fnum;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("close <fnum>\n");
 		return 1;
 	}
@@ -2451,13 +2452,13 @@ static int cmd_lock(void)
 	enum brl_type lock_type;
 	int fnum;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("lock <fnum> [r|w] <hex-start> <hex-len>\n");
 		return 1;
 	}
 	fnum = atoi(buf);
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("lock <fnum> [r|w] <hex-start> <hex-len>\n");
 		return 1;
 	}
@@ -2471,14 +2472,14 @@ static int cmd_lock(void)
 		return 1;
 	}
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("lock <fnum> [r|w] <hex-start> <hex-len>\n");
 		return 1;
 	}
 
 	start = (SMB_BIG_UINT)strtol(buf, (char **)NULL, 16);
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("lock <fnum> [r|w] <hex-start> <hex-len>\n");
 		return 1;
 	}
@@ -2499,20 +2500,20 @@ static int cmd_unlock(void)
 	SMB_BIG_UINT start, len;
 	int fnum;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("unlock <fnum> <hex-start> <hex-len>\n");
 		return 1;
 	}
 	fnum = atoi(buf);
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("unlock <fnum> <hex-start> <hex-len>\n");
 		return 1;
 	}
 
 	start = (SMB_BIG_UINT)strtol(buf, (char **)NULL, 16);
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("unlock <fnum> <hex-start> <hex-len>\n");
 		return 1;
 	}
@@ -2539,7 +2540,7 @@ static int cmd_rmdir(void)
 	char *targetname = NULL;
 	struct cli_state *targetcli;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("rmdir <dirname>\n");
 		return 1;
 	}
@@ -2578,8 +2579,8 @@ static int cmd_link(void)
 	char *targetname = NULL;
 	struct cli_state *targetcli;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL) ||
-	    !next_token_nr_talloc(ctx,NULL,&buf2,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
+	    !next_token_talloc(ctx, &cmd_ptr,&buf2,NULL)) {
 		d_printf("link <oldname> <newname>\n");
 		return 1;
 	}
@@ -2629,8 +2630,8 @@ static int cmd_symlink(void)
 	char *targetname = NULL;
 	struct cli_state *targetcli;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL) ||
-	    !next_token_nr_talloc(ctx,NULL,&buf2,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
+	    !next_token_talloc(ctx, &cmd_ptr,&buf2,NULL)) {
 		d_printf("symlink <oldname> <newname>\n");
 		return 1;
 	}
@@ -2682,8 +2683,8 @@ static int cmd_chmod(void)
 	struct cli_state *targetcli;
 	mode_t mode;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL) ||
-	    !next_token_nr_talloc(ctx,NULL,&buf2,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
+	    !next_token_talloc(ctx, &cmd_ptr,&buf2,NULL)) {
 		d_printf("chmod mode file\n");
 		return 1;
 	}
@@ -2838,7 +2839,7 @@ static int cmd_getfacl(void)
 	uint16 num_dir_acls = 0;
 	uint16 i;
 
-	if (!next_token_nr_talloc(ctx,NULL,&name,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&name,NULL)) {
 		d_printf("getfacl filename\n");
 		return 1;
 	}
@@ -3004,7 +3005,7 @@ static int cmd_stat(void)
 	SMB_STRUCT_STAT sbuf;
 	struct tm *lt;
 
-	if (!next_token_nr_talloc(ctx,NULL,&name,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&name,NULL)) {
 		d_printf("stat file\n");
 		return 1;
 	}
@@ -3100,9 +3101,9 @@ static int cmd_chown(void)
 	struct cli_state *targetcli;
 	char *targetname = NULL;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL) ||
-	    !next_token_nr_talloc(ctx,NULL,&buf2,NULL) ||
-	    !next_token_nr_talloc(ctx,NULL,&buf3,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
+	    !next_token_talloc(ctx, &cmd_ptr,&buf2,NULL) ||
+	    !next_token_talloc(ctx, &cmd_ptr,&buf3,NULL)) {
 		d_printf("chown uid gid file\n");
 		return 1;
 	}
@@ -3149,8 +3150,8 @@ static int cmd_rename(void)
 	char *targetsrc;
 	char *targetdest;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL) ||
-	    !next_token_nr_talloc(ctx,NULL,&buf2,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
+	    !next_token_talloc(ctx, &cmd_ptr,&buf2,NULL)) {
 		d_printf("rename <src> <dest>\n");
 		return 1;
 	}
@@ -3224,8 +3225,8 @@ static int cmd_hardlink(void)
 	struct cli_state *targetcli;
 	char *targetname;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL) ||
-	    !next_token_nr_talloc(ctx,NULL,&buf2,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
+	    !next_token_talloc(ctx, &cmd_ptr,&buf2,NULL)) {
 		d_printf("hardlink <src> <dest>\n");
 		return 1;
 	}
@@ -3281,7 +3282,7 @@ static int cmd_newer(void)
 	bool ok;
 	SMB_STRUCT_STAT sbuf;
 
-	ok = next_token_nr_talloc(ctx,NULL,&buf,NULL);
+	ok = next_token_talloc(ctx, &cmd_ptr,&buf,NULL);
 	if (ok && (sys_stat(buf,&sbuf) == 0)) {
 		newer_than = sbuf.st_mtime;
 		DEBUG(1,("Getting files newer than %s",
@@ -3307,7 +3308,7 @@ static int cmd_archive(void)
 	TALLOC_CTX *ctx = talloc_tos();
 	char *buf;
 
-	if (next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		archive_level = atoi(buf);
 	} else {
 		d_printf("Archive level is %d\n",archive_level);
@@ -3386,7 +3387,7 @@ static int cmd_lcd(void)
 	char *buf;
 	char *d;
 
-	if (next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		chdir(buf);
 	}
 	d = TALLOC_ARRAY(ctx, char, PATH_MAX+1);
@@ -3417,7 +3418,7 @@ static int cmd_reget(void)
 		return 1;
 	}
 
-	if (!next_token_nr_talloc(ctx, NULL, &fname, NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr, &fname, NULL)) {
 		d_printf("reget <filename>\n");
 		return 1;
 	}
@@ -3431,7 +3432,7 @@ static int cmd_reget(void)
 	}
 
 	local_name = fname;
-	next_token_nr_talloc(ctx, NULL, &p, NULL);
+	next_token_talloc(ctx, &cmd_ptr, &p, NULL);
 	if (p) {
 		local_name = p;
 	}
@@ -3459,7 +3460,7 @@ static int cmd_reput(void)
 		return 1;
 	}
 
-	if (!next_token_nr_talloc(ctx, NULL, &local_name, NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr, &local_name, NULL)) {
 		d_printf("reput <filename>\n");
 		return 1;
 	}
@@ -3469,7 +3470,7 @@ static int cmd_reput(void)
 		return 1;
 	}
 
-	if (next_token_nr_talloc(ctx, NULL, &buf, NULL)) {
+	if (next_token_talloc(ctx, &cmd_ptr, &buf, NULL)) {
 		remote_name = talloc_asprintf_append(remote_name,
 						buf);
 	} else {
@@ -3643,7 +3644,7 @@ static int cmd_vuid(void)
 	TALLOC_CTX *ctx = talloc_tos();
 	char *buf;
 
-	if (!next_token_nr_talloc(ctx,NULL,&buf,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
 		d_printf("Current VUID is %d\n", cli->vuid);
 		return 0;
 	}
@@ -3661,12 +3662,12 @@ static int cmd_logon(void)
 	TALLOC_CTX *ctx = talloc_tos();
 	char *l_username, *l_password;
 
-	if (!next_token_nr_talloc(ctx,NULL,&l_username,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&l_username,NULL)) {
 		d_printf("logon <username> [<password>]\n");
 		return 0;
 	}
 
-	if (!next_token_nr_talloc(ctx,NULL,&l_password,NULL)) {
+	if (!next_token_talloc(ctx, &cmd_ptr,&l_password,NULL)) {
 		char *pass = getpass("Password: ");
 		if (pass) {
 			l_password = talloc_strdup(ctx,pass);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list