Fix Bug #5898. ("net rpc shutdown" fails).
authorGünther Deschner <gd@samba.org>
Tue, 18 Nov 2008 22:10:22 +0000 (23:10 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 18 Nov 2008 22:10:22 +0000 (23:10 +0100)
Guenther

source/utils/net_rpc.c

index ef1ebd3491ff5c952e6225e8ced80b959c33a220..945ca38d8bb72a515c084d22c4d75461cde4e301 100644 (file)
@@ -5201,7 +5201,7 @@ NTSTATUS rpc_init_shutdown_internals(const DOM_SID *domain_sid,
        struct initshutdown_String msg_string;
        struct initshutdown_String_sub s;
 
-       if (opt_comment) {
+       if (opt_comment && strlen(opt_comment)) {
                msg = opt_comment;
        }
        if (opt_timeout) {
@@ -5255,7 +5255,7 @@ NTSTATUS rpc_reg_shutdown_internals(const DOM_SID *domain_sid,
        NTSTATUS result;
        WERROR werr;
 
-       if (opt_comment) {
+       if (opt_comment && strlen(opt_comment)) {
                msg = opt_comment;
        }
        s.name = msg;