Follow error code name convention in libwbclient.
authorGerald W. Carter <jerry@samba.org>
Thu, 17 Apr 2008 15:49:53 +0000 (17:49 +0200)
committerGerald W. Carter <jerry@samba.org>
Thu, 17 Apr 2008 15:49:53 +0000 (17:49 +0200)
s/WBC_INVALID_RESPONSE/WBC_ERR_INVALID_RESPONSE/
(This used to be commit d91ce012b0afb30cd22b373412d17de27c55ca86)

source3/nsswitch/libwbclient/wbc_pam.c
source3/nsswitch/libwbclient/wbc_sid.c
source3/nsswitch/libwbclient/wbclient.c
source3/nsswitch/libwbclient/wbclient.h

index f6a355a413f9245e1283b2d9015a15f36aceda11..00e1f46fd9a0c2fa4e703d865a8e102e3c1a8489 100644 (file)
@@ -138,7 +138,7 @@ static wbcErr wbc_create_auth_info(TALLOC_CTX *mem_ctx,
 
        p = (char *)resp->extra_data.data;
        if (!p) {
 
        p = (char *)resp->extra_data.data;
        if (!p) {
-               wbc_status = WBC_INVALID_RESPONSE;
+               wbc_status = WBC_ERR_INVALID_RESPONSE;
                BAIL_ON_WBC_ERROR(wbc_status);
        }
 
                BAIL_ON_WBC_ERROR(wbc_status);
        }
 
@@ -149,7 +149,7 @@ static wbcErr wbc_create_auth_info(TALLOC_CTX *mem_ctx,
                char *s = p;
                char *e = strchr(p, '\n');
                if (!e) {
                char *s = p;
                char *e = strchr(p, '\n');
                if (!e) {
-                       wbc_status = WBC_INVALID_RESPONSE;
+                       wbc_status = WBC_ERR_INVALID_RESPONSE;
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
                e[0] = '\0';
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
                e[0] = '\0';
@@ -157,7 +157,7 @@ static wbcErr wbc_create_auth_info(TALLOC_CTX *mem_ctx,
 
                ret = sscanf(s, "0x%08X:0x%08X", &rid, &attrs);
                if (ret != 2) {
 
                ret = sscanf(s, "0x%08X:0x%08X", &rid, &attrs);
                if (ret != 2) {
-                       wbc_status = WBC_INVALID_RESPONSE;
+                       wbc_status = WBC_ERR_INVALID_RESPONSE;
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
 
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
 
@@ -173,7 +173,7 @@ static wbcErr wbc_create_auth_info(TALLOC_CTX *mem_ctx,
                char *a;
                char *e = strchr(p, '\n');
                if (!e) {
                char *a;
                char *e = strchr(p, '\n');
                if (!e) {
-                       wbc_status = WBC_INVALID_RESPONSE;
+                       wbc_status = WBC_ERR_INVALID_RESPONSE;
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
                e[0] = '\0';
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
                e[0] = '\0';
@@ -181,7 +181,7 @@ static wbcErr wbc_create_auth_info(TALLOC_CTX *mem_ctx,
 
                e = strchr(s, ':');
                if (!e) {
 
                e = strchr(s, ':');
                if (!e) {
-                       wbc_status = WBC_INVALID_RESPONSE;
+                       wbc_status = WBC_ERR_INVALID_RESPONSE;
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
                e[0] = '\0';
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
                e[0] = '\0';
@@ -190,7 +190,7 @@ static wbcErr wbc_create_auth_info(TALLOC_CTX *mem_ctx,
                ret = sscanf(a, "0x%08X",
                             &attrs);
                if (ret != 1) {
                ret = sscanf(a, "0x%08X",
                             &attrs);
                if (ret != 1) {
-                       wbc_status = WBC_INVALID_RESPONSE;
+                       wbc_status = WBC_ERR_INVALID_RESPONSE;
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
 
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
 
index 6ef9f44c3bee4b88ff5b3047d2ce55c96a8887e4..de9b02822f508b8d4c6655f8235b5f9dcc4c0301 100644 (file)
@@ -372,21 +372,21 @@ wbcErr wbcLookupRids(struct wbcDomainSid *dom_sid,
                char *q;
 
                if (*p == '\0') {
                char *q;
 
                if (*p == '\0') {
-                       wbc_status = WBC_INVALID_RESPONSE;
+                       wbc_status = WBC_ERR_INVALID_RESPONSE;
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
 
                (*types)[i] = (enum wbcSidType)strtoul(p, &q, 10);
 
                if (*q != ' ') {
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
 
                (*types)[i] = (enum wbcSidType)strtoul(p, &q, 10);
 
                if (*q != ' ') {
-                       wbc_status = WBC_INVALID_RESPONSE;
+                       wbc_status = WBC_ERR_INVALID_RESPONSE;
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
 
                p = q+1;
 
                if ((q = strchr(p, '\n')) == NULL) {
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
 
                p = q+1;
 
                if ((q = strchr(p, '\n')) == NULL) {
-                       wbc_status = WBC_INVALID_RESPONSE;
+                       wbc_status = WBC_ERR_INVALID_RESPONSE;
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
 
                        BAIL_ON_WBC_ERROR(wbc_status);
                }
 
@@ -399,7 +399,7 @@ wbcErr wbcLookupRids(struct wbcDomainSid *dom_sid,
        }
 
        if (*p != '\0') {
        }
 
        if (*p != '\0') {
-               wbc_status = WBC_INVALID_RESPONSE;
+               wbc_status = WBC_ERR_INVALID_RESPONSE;
                BAIL_ON_WBC_ERROR(wbc_status);
        }
 
                BAIL_ON_WBC_ERROR(wbc_status);
        }
 
@@ -471,7 +471,7 @@ wbcErr wbcLookupUserSids(const struct wbcDomainSid *user_sid,
 
        if (response.data.num_entries &&
            !response.extra_data.data) {
 
        if (response.data.num_entries &&
            !response.extra_data.data) {
-               wbc_status = WBC_INVALID_RESPONSE;
+               wbc_status = WBC_ERR_INVALID_RESPONSE;
                BAIL_ON_WBC_ERROR(wbc_status);
        }
 
                BAIL_ON_WBC_ERROR(wbc_status);
        }
 
index b52c6b01e478a196b3898e2afc37e58190ca3c7f..9383fd5406d58a00f57b1325f30d5f957513a9ea 100644 (file)
@@ -106,8 +106,8 @@ const char *wbcErrorString(wbcErr error)
                return "WBC_ERR_WINBIND_NOT_AVAILABLE";
        case WBC_ERR_DOMAIN_NOT_FOUND:
                return "WBC_ERR_DOMAIN_NOT_FOUND";
                return "WBC_ERR_WINBIND_NOT_AVAILABLE";
        case WBC_ERR_DOMAIN_NOT_FOUND:
                return "WBC_ERR_DOMAIN_NOT_FOUND";
-       case WBC_INVALID_RESPONSE:
-               return "WBC_INVALID_RESPONSE";
+       case WBC_ERR_INVALID_RESPONSE:
+               return "WBC_ERR_INVALID_RESPONSE";
        case WBC_ERR_NSS_ERROR:
                return "WBC_ERR_NSS_ERROR";
        case WBC_ERR_AUTH_ERROR:
        case WBC_ERR_NSS_ERROR:
                return "WBC_ERR_NSS_ERROR";
        case WBC_ERR_AUTH_ERROR:
index b36b5bbe889b0266a65696153b6a94929ebe6cc3..812751d9b53914ea014cc903b265d1257f130298 100644 (file)
@@ -40,7 +40,7 @@ enum _wbcErrType {
        WBC_ERR_INVALID_PARAM,  /**< An Invalid parameter was supplied **/
        WBC_ERR_WINBIND_NOT_AVAILABLE,   /**< Winbind daemon is not available **/
        WBC_ERR_DOMAIN_NOT_FOUND,        /**< Domain is not trusted or cannot be found **/
        WBC_ERR_INVALID_PARAM,  /**< An Invalid parameter was supplied **/
        WBC_ERR_WINBIND_NOT_AVAILABLE,   /**< Winbind daemon is not available **/
        WBC_ERR_DOMAIN_NOT_FOUND,        /**< Domain is not trusted or cannot be found **/
-       WBC_INVALID_RESPONSE,        /**< Winbind returned an invalid response **/
+       WBC_ERR_INVALID_RESPONSE,        /**< Winbind returned an invalid response **/
        WBC_ERR_NSS_ERROR,            /**< NSS_STATUS error **/
        WBC_ERR_AUTH_ERROR        /**< Authentication failed **/
 };
        WBC_ERR_NSS_ERROR,            /**< NSS_STATUS error **/
        WBC_ERR_AUTH_ERROR        /**< Authentication failed **/
 };