Attempt to fix the s4 build -- we can not use map_nt_error_from_unix in lib/
authorVolker Lendecke <vl@samba.org>
Sat, 14 Nov 2009 10:32:00 +0000 (11:32 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 14 Nov 2009 10:32:38 +0000 (11:32 +0100)
lib/util/tevent_ntstatus.c
lib/util/tevent_ntstatus.h
source3/include/proto.h
source3/lib/util.c

index e6b37f64b6084169fd3e776a38f3d752e38f598f..4be45754994fd1eef1a982510cb62131e83ab48d 100644 (file)
@@ -74,20 +74,3 @@ void tevent_req_simple_finish_ntstatus(struct tevent_req *subreq,
        }
        tevent_req_done(req);
 }
-
-/*
- * We have to declare map_nt_error_from_unix here, both s3 and s4 have their
- * (different) implementations of it.
- */
-NTSTATUS map_nt_error_from_unix(int sys_errno);
-
-bool tevent_req_poll_ntstatus(struct tevent_req *req,
-                             struct tevent_context *ev,
-                             NTSTATUS *status)
-{
-       bool ret = tevent_req_poll(req, ev);
-       if (!ret) {
-               *status = map_nt_error_from_unix(errno);
-       }
-       return ret;
-}
index 7f312b707bde14808be919dc755c9795f3fad22a..4cf593a454ad9f66a23bd70667a7629ba098deb8 100644 (file)
@@ -36,12 +36,4 @@ NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req);
 void tevent_req_simple_finish_ntstatus(struct tevent_req *subreq,
                                       NTSTATUS subreq_status);
 
-/*
- * Wrapper for tevent_req_poll that grabs NTSTATUS directly in case of a
- * failure
- */
-bool tevent_req_poll_ntstatus(struct tevent_req *req,
-                             struct tevent_context *ev,
-                             NTSTATUS *status);
-
 #endif
index 8c0a3e319d751d591106d220438223330b24bdb0..d4e0ac55c5ea12ab8b362a3356f57492ea593317 100644 (file)
@@ -1228,6 +1228,9 @@ bool is_valid_policy_hnd(const struct policy_handle *hnd);
 bool policy_hnd_equal(const struct policy_handle *hnd1,
                      const struct policy_handle *hnd2);
 const char *strip_hostname(const char *s);
+bool tevent_req_poll_ntstatus(struct tevent_req *req,
+                             struct tevent_context *ev,
+                             NTSTATUS *status);
 
 /* The following definitions come from lib/util_file.c  */
 
index 247042d7d97b3e8d6db84640b586baf0ef87f715..9d12e5b56097cd14f65fb038219fddfb62c148fb 100644 (file)
@@ -3080,3 +3080,14 @@ const char *strip_hostname(const char *s)
 
        return s;
 }
+
+bool tevent_req_poll_ntstatus(struct tevent_req *req,
+                             struct tevent_context *ev,
+                             NTSTATUS *status)
+{
+       bool ret = tevent_req_poll(req, ev);
+       if (!ret) {
+               *status = map_nt_error_from_unix(errno);
+       }
+       return ret;
+}