diff options
-rw-r--r-- | prog_guide.txt | 7 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/prog_guide.txt b/prog_guide.txt index df03ecac22..b604b8ee5f 100644 --- a/prog_guide.txt +++ b/prog_guide.txt @@ -564,10 +564,9 @@ where TRANSPORT is either ncacn_np for SMB or ncacn_ip_tcp for RPC/TCP "host" is an IP or hostname or netbios name -"flags" must start with the pipe name if using the ncacn_np transport - -The ncacn_ip_tcp can take an integer flag giving the TCP port -number. It must be the first flag if given. +"flags" can include a SMB pipe name if using the ncacn_np transport or +a TCP port number if using the ncacn_ip_tcp transport, otherwise they +will be auto-determined. other recognised flags are: diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index fbc97f316d..f1b719e64a 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -364,7 +364,11 @@ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_ for (i=0;b->options[i];i++) { for (j=0;j<ARRAY_SIZE(options);j++) { if (strcasecmp(options[j].name, b->options[i]) == 0) { + int k; b->flags |= options[j].flag; + for (k=i;b->options[k];k++) { + b->options[k] = b->options[k+1]; + } break; } } |