summaryrefslogtreecommitdiff
path: root/source3/utils/net.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2004-08-20 20:13:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:25 -0500
commit19e949a91ba342ec1de2c01e5bfddf8392cb68b5 (patch)
treeb404cbcc6af35cb4ef16b594d8c1d141144fd6a1 /source3/utils/net.c
parent3eb42d3b6e64c817396ee4391e0dcaacc5db0029 (diff)
downloadsamba-19e949a91ba342ec1de2c01e5bfddf8392cb68b5.tar.gz
samba-19e949a91ba342ec1de2c01e5bfddf8392cb68b5.tar.bz2
samba-19e949a91ba342ec1de2c01e5bfddf8392cb68b5.zip
r1966: further work on and cleanup of the net-migration-tool.
It's now possible to migrate files preserving dos-attributes and correct timestamps. Also added some small docu- and syntax-fixes. Guenther (This used to be commit 0e990582a0416933a8671ca660d22e980f828402)
Diffstat (limited to 'source3/utils/net.c')
-rw-r--r--source3/utils/net.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index 6a1a97914a..2c7ee7a224 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -79,6 +79,8 @@ BOOL opt_domaingroup = False;
const char *opt_newntname = "";
int opt_rid = 0;
int opt_acls = 0;
+int opt_attrs = 0;
+int opt_timestamps = 0;
const char *opt_exclude = NULL;
BOOL opt_have_ip = False;
@@ -209,9 +211,9 @@ NTSTATUS connect_to_ipc_anonymous(struct cli_state **c,
/**
* Connect the local server and open a given pipe
*
- * @param cli_local A cli_state to the local spoolss-server
+ * @param cli_local A cli_state
* @param pipe The pipe to open
- * @param got_pipe boolean to that stores if got a pipe
+ * @param got_pipe boolean that stores if we got a pipe
*
* @return Normal NTSTATUS return.
**/
@@ -222,13 +224,13 @@ NTSTATUS connect_local_pipe(struct cli_state **cli_local, int pipe_num, BOOL *go
char *server_name = strdup("127.0.0.1");
struct cli_state *cli_tmp = NULL;
- /* make a connection to smbd via loopback */
+ /* make a connection to local named pipe via loopback */
nt_status = connect_to_ipc(&cli_tmp, &loopback_ip, server_name);
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;
if (!cli_nt_session_open(cli_tmp, pipe_num)) {
- DEBUG(0, ("couldn't not initialise spoolss pipe\n"));
+ DEBUG(0, ("couldn't not initialize pipe\n"));
cli_shutdown(cli_tmp);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -738,7 +740,9 @@ static struct functable net_func[] = {
{"ntname", 'N', POPT_ARG_STRING, &opt_newntname},
{"rid", 'R', POPT_ARG_INT, &opt_rid},
/* Options for 'net rpc share migrate' */
- {"acls", 'a', POPT_ARG_NONE, &opt_acls},
+ {"acls", 0, POPT_ARG_NONE, &opt_acls},
+ {"attrs", 0, POPT_ARG_NONE, &opt_attrs},
+ {"timestamps", 0, POPT_ARG_NONE, &opt_timestamps},
{"exclude", 'e', POPT_ARG_STRING, &opt_exclude},
POPT_COMMON_SAMBA