samba_dnsupdate: do not interpret failure count as unix error code
authorBob Campbell <bobcampbell@catalyst.net.nz>
Fri, 3 Jun 2016 01:56:23 +0000 (13:56 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 3 Jun 2016 05:27:22 +0000 (07:27 +0200)
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
lib/util/util_runcmd.c
source4/dsdb/dns/dns_update.c

index cc194fc68e9339efe1402d04e8ad4408e23fb8e7..02de77ee864d00e5ec8a0c2d6f48699e770bdd3a 100644 (file)
@@ -304,8 +304,8 @@ static void samba_runcmd_io_handler(struct tevent_context *ev,
                                return;
                        }
                        status = WEXITSTATUS(status);
-                       DEBUG(3,("Child %s exited with status %d - %s\n",
-                                state->arg0, status, strerror(status)));
+                       DEBUG(3,("Child %s exited with status %d\n",
+                                state->arg0, status));
                        if (status != 0) {
                                tevent_req_error(req, status);
                                return;
index 292a825092349e433e42dfa486c755900a8720f4..0c0e4b4512e4a59388b17bb915e58634c18519de 100644 (file)
@@ -284,15 +284,10 @@ static void dnsupdate_nameupdate_done(struct tevent_req *subreq)
 
        ret = samba_runcmd_recv(subreq, &sys_errno);
        TALLOC_FREE(subreq);
-       if (ret != 0) {
-               service->nameupdate.status = map_nt_error_from_unix_common(sys_errno);
-       } else {
-               service->nameupdate.status = NT_STATUS_OK;
-       }
 
-       if (!NT_STATUS_IS_OK(service->nameupdate.status)) {
-               DEBUG(0,(__location__ ": Failed DNS update - %s\n",
-                        nt_errstr(service->nameupdate.status)));
+       if (ret != 0) {
+               DEBUG(0,(__location__ ": Failed DNS update - with error code %d\n",
+                        sys_errno));
        } else {
                DEBUG(3,("Completed DNS update check OK\n"));
        }