diff options
author | Tim Potter <tpot@samba.org> | 2001-08-28 06:38:11 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-08-28 06:38:11 +0000 |
commit | 49dff249fc3f9155037016dd131cbaa41e5306bc (patch) | |
tree | ac3f45a9570bcd602c48cf89f91f0b470f0b1dbe | |
parent | cb9b39dd8289d3bec54ea9033994c59086fb7eec (diff) | |
download | samba-49dff249fc3f9155037016dd131cbaa41e5306bc.tar.gz samba-49dff249fc3f9155037016dd131cbaa41e5306bc.tar.bz2 samba-49dff249fc3f9155037016dd131cbaa41e5306bc.zip |
Added samsync and samrepl (untested) message types to smbcontrol.
(This used to be commit b0c8090396ca02d06669d6e20a1c715fc83ff887)
-rw-r--r-- | source3/utils/smbcontrol.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 088ce0c08e..112c707412 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -33,6 +33,8 @@ static struct { {"debuglevel", MSG_REQ_DEBUGLEVEL}, {"printer-notify", MSG_PRINTER_NOTIFY}, {"close-share", MSG_SMB_FORCE_TDIS}, + {"samsync", MSG_SMB_SAM_SYNC}, + {"samrepl", MSG_SMB_SAM_REPL}, {NULL, -1} }; @@ -299,6 +301,42 @@ static BOOL do_command(char *dest, char *msg_name, char **params) strlen(params[0]) + 1, False); break; + case MSG_SMB_SAM_SYNC: + if (!strequal(dest, "smbd")) { + fprintf(stderr, "samsync can only be sent to smbd\n"); + return False; + } + + if (params) { + fprintf(stderr, "samsync does not take any parameters\n"); + return False; + } + + retval = send_message(dest, MSG_SMB_SAM_SYNC, NULL, 0, False); + + break; + + case MSG_SMB_SAM_REPL: { + uint32 seqnum; + + if (!strequal(dest, "smbd")) { + fprintf(stderr, "sam repl can only be sent to smbd\n"); + return False; + } + + if (!params || !params[0]) { + fprintf(stderr, "SAM_REPL needs a parameter\n"); + return False; + } + + seqnum = atoi(params[0]); + + retval = send_message(dest, MSG_SMB_SAM_SYNC, + (char *)&seqnum, sizeof(uint32), False); + + break; + } + case MSG_PING: if (!pong_registered) { message_register(MSG_PONG, pong_function); |