Updated error message text and reduced its debug level
authorMarc Muehlfeld <mmuehlfeld@samba.org>
Wed, 11 Oct 2017 07:49:45 +0000 (09:49 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 12 Oct 2017 19:14:13 +0000 (21:14 +0200)
Previously, "net rpc share add|remove" commands failed if no
"add|delete share command" parameter was set in smb.conf. However,
the error was only logged at level 10 and not very clear.
This patch updates the error message text and sets the log level of this
error to 1 to make it more obvious what is missing.

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_server/srvsvc/srv_srvsvc_nt.c

index f3173aee42f8f8b56ca9b32ac92f1fb05f93067c..2a8cf8de650554bda64e0a812c0acd14b45cf4db 100644 (file)
@@ -1984,7 +1984,7 @@ WERROR _srvsvc_NetShareAdd(struct pipes_struct *p,
                return WERR_ACCESS_DENIED;
 
        if (!lp_add_share_command(talloc_tos()) || !*lp_add_share_command(talloc_tos())) {
-               DEBUG(10,("_srvsvc_NetShareAdd: No add share command\n"));
+               DBG_WARNING("_srvsvc_NetShareAdd: No \"add share command\" parameter set in smb.conf.\n");
                return WERR_ACCESS_DENIED;
        }
 
@@ -2196,7 +2196,7 @@ WERROR _srvsvc_NetShareDel(struct pipes_struct *p,
                return WERR_ACCESS_DENIED;
 
        if (!lp_delete_share_command(talloc_tos()) || !*lp_delete_share_command(talloc_tos())) {
-               DEBUG(10,("_srvsvc_NetShareDel: No delete share command\n"));
+               DBG_WARNING("_srvsvc_NetShareDel: No \"delete share command\" parameter set in smb.conf.\n");
                return WERR_ACCESS_DENIED;
        }