summaryrefslogtreecommitdiff
path: root/libcli/util
diff options
context:
space:
mode:
Diffstat (limited to 'libcli/util')
-rw-r--r--libcli/util/doserr.c2
-rw-r--r--libcli/util/werror.h13
2 files changed, 15 insertions, 0 deletions
diff --git a/libcli/util/doserr.c b/libcli/util/doserr.c
index 160e7bc3e0..1044ab351a 100644
--- a/libcli/util/doserr.c
+++ b/libcli/util/doserr.c
@@ -135,6 +135,7 @@ static const struct werror_code_struct dos_errs[] =
{ "WERR_INVALID_FLAGS", WERR_INVALID_FLAGS },
{ "WERR_NOT_FOUND", WERR_NOT_FOUND },
{ "WERR_SERVER_UNAVAILABLE", WERR_SERVER_UNAVAILABLE },
+ { "WERR_INVALID_USER_BUFFER", WERR_INVALID_USER_BUFFER },
{ "WERR_NO_TRUST_SAM_ACCOUNT", WERR_NO_TRUST_SAM_ACCOUNT },
{ "WERR_CLASS_NOT_REGISTERED", WERR_CLASS_NOT_REGISTERED },
{ "WERR_NO_SHUTDOWN_IN_PROGRESS", WERR_NO_SHUTDOWN_IN_PROGRESS },
@@ -168,6 +169,7 @@ static const struct werror_code_struct dos_errs[] =
{ "WERR_SERVICE_NEVER_STARTED", WERR_SERVICE_NEVER_STARTED },
{ "WERR_PASSWORD_MUST_CHANGE", WERR_PASSWORD_MUST_CHANGE },
{ "WERR_ACCOUNT_LOCKED_OUT", WERR_ACCOUNT_LOCKED_OUT },
+ { "WERR_UNKNOWN_PRINT_MONITOR", WERR_UNKNOWN_PRINT_MONITOR },
{ NULL, W_ERROR(0) }
};
diff --git a/libcli/util/werror.h b/libcli/util/werror.h
index d22516ae5c..15251a44fc 100644
--- a/libcli/util/werror.h
+++ b/libcli/util/werror.h
@@ -60,6 +60,18 @@ typedef uint32_t WERROR;
}\
} while (0)
+#define W_ERROR_NOT_OK_GOTO_DONE(x) do { \
+ if (!W_ERROR_IS_OK(x)) {\
+ goto done;\
+ }\
+} while (0)
+
+#define W_ERROR_NOT_OK_GOTO(x, y) do {\
+ if (!W_ERROR_IS_OK(x)) {\
+ goto y;\
+ }\
+} while(0)
+
/* these are win32 error codes. There are only a few places where
these matter for Samba, primarily in the NT printing code */
#define WERR_OK W_ERROR(0)
@@ -136,6 +148,7 @@ typedef uint32_t WERROR;
#define WERR_TIME_SKEW W_ERROR(1398)
#define WERR_EVENTLOG_FILE_CORRUPT W_ERROR(1500)
#define WERR_SERVER_UNAVAILABLE W_ERROR(1722)
+#define WERR_INVALID_USER_BUFFER W_ERROR(1784)
#define WERR_NO_TRUST_SAM_ACCOUNT W_ERROR(1787)
#define WERR_INVALID_FORM_NAME W_ERROR(1902)
#define WERR_INVALID_FORM_SIZE W_ERROR(1903)