Fix debugging compilation.
This commit is contained in:
parent
ca7489bf5c
commit
edd9734813
1
dist/openpam/lib/openpam_borrow_cred.c
vendored
1
dist/openpam/lib/openpam_borrow_cred.c
vendored
@ -96,6 +96,7 @@ openpam_borrow_cred(pam_handle_t *pamh,
|
||||
RETURNC(PAM_SYSTEM_ERR);
|
||||
}
|
||||
RETURNC(PAM_SUCCESS);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/openpam_dispatch.c
vendored
1
dist/openpam/lib/openpam_dispatch.c
vendored
@ -172,6 +172,7 @@ openpam_dispatch(pam_handle_t *pamh,
|
||||
if (!fail && err != PAM_NEW_AUTHTOK_REQD)
|
||||
err = PAM_SUCCESS;
|
||||
RETURNC(err);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
#if !defined(OPENPAM_RELAX_CHECKS)
|
||||
|
1
dist/openpam/lib/openpam_findenv.c
vendored
1
dist/openpam/lib/openpam_findenv.c
vendored
@ -61,6 +61,7 @@ openpam_findenv(pam_handle_t *pamh,
|
||||
pamh->env[i][len] == '=')
|
||||
RETURNN(i);
|
||||
RETURNN(-1);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/openpam_get_option.c
vendored
1
dist/openpam/lib/openpam_get_option.c
vendored
@ -71,6 +71,7 @@ openpam_get_option(pam_handle_t *pamh,
|
||||
}
|
||||
}
|
||||
RETURNS(NULL);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
63
dist/openpam/lib/openpam_impl.h
vendored
63
dist/openpam/lib/openpam_impl.h
vendored
@ -136,46 +136,45 @@ pam_module_t *openpam_dynamic(const char *);
|
||||
|
||||
#ifdef DEBUG
|
||||
#define ENTER() openpam_log(PAM_LOG_DEBUG, "entering")
|
||||
#define ENTERI(i) do { \
|
||||
if ((i) > 0 && (i) < PAM_NUM_ITEMS) \
|
||||
openpam_log(PAM_LOG_DEBUG, "entering: %s", _pam_item_name[i]); \
|
||||
#define ENTERI(iv) do { \
|
||||
if (/*CONSTCOND*/(iv) > 0 && (iv) < PAM_NUM_ITEMS) \
|
||||
openpam_log(PAM_LOG_DEBUG, "entering: %s", \
|
||||
_pam_item_name[(iv)]); \
|
||||
else \
|
||||
openpam_log(PAM_LOG_DEBUG, "entering: %d", (i)); \
|
||||
openpam_log(PAM_LOG_DEBUG, "entering: %d", (iv)); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
#define ENTERN(n) do { \
|
||||
openpam_log(PAM_LOG_DEBUG, "entering: %d", (n)); \
|
||||
} while (0)
|
||||
#define ENTERS(s) do { \
|
||||
if ((s) == NULL) \
|
||||
openpam_log(PAM_LOG_DEBUG, "entering: NULL"); \
|
||||
else \
|
||||
openpam_log(PAM_LOG_DEBUG, "entering: '%s'", (s)); \
|
||||
#define ENTERN(num) do { \
|
||||
openpam_log(PAM_LOG_DEBUG, "entering: %d", (num)); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
#define ENTERS(str) do { \
|
||||
openpam_log(PAM_LOG_DEBUG, "entering: '%s'", \
|
||||
/*CONSTCOND*/(str) ? (str) : "(null)"); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
#define RETURNV() openpam_log(PAM_LOG_DEBUG, "returning")
|
||||
#define RETURNC(c) do { \
|
||||
if ((c) >= 0 && (c) < PAM_NUM_ERRORS) \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning %s", _pam_err_name[c]); \
|
||||
#define RETURNC(chr) do { \
|
||||
if (/*CONSTCOND*/(chr) >= 0 && (chr) < PAM_NUM_ERRORS) \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning %s", \
|
||||
_pam_err_name[(chr)]); \
|
||||
else \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning %d!", (c)); \
|
||||
return (c); \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning %d!", (chr)); \
|
||||
return (chr); \
|
||||
/*NOTREACHED*/ \
|
||||
} while (/*CONSTCOND*/0)
|
||||
#define RETURNN(n) do { \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning %d", (n)); \
|
||||
return (n); \
|
||||
#define RETURNN(num) do { \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning %d", (num)); \
|
||||
return (num); \
|
||||
/*NOTREACHED*/ \
|
||||
} while (/*CONSTCOND*/0)
|
||||
#define RETURNP(p) do { \
|
||||
if ((p) == NULL) \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning NULL"); \
|
||||
else \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning %p", (p)); \
|
||||
return (p); \
|
||||
#define RETURNP(ptr) do { \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning %p", (ptr)); \
|
||||
return (ptr); \
|
||||
/*NOTREACHED*/ \
|
||||
} while (/*CONSTCOND*/0)
|
||||
#define RETURNS(s) do { \
|
||||
if ((s) == NULL) \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning NULL"); \
|
||||
else \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning '%s'", (s)); \
|
||||
return (s); \
|
||||
#define RETURNS(str) do { \
|
||||
openpam_log(PAM_LOG_DEBUG, "returning '%s'", \
|
||||
/*CONSTCOND*/(str) ? (str) : "(null)"); \
|
||||
return (str); \
|
||||
/*NOTREACHED*/ \
|
||||
} while (/*CONSTCOND*/0)
|
||||
#else
|
||||
#define ENTER()
|
||||
|
1
dist/openpam/lib/openpam_nullconv.c
vendored
1
dist/openpam/lib/openpam_nullconv.c
vendored
@ -63,6 +63,7 @@ openpam_nullconv(int n,
|
||||
/*LINTED unused*/
|
||||
(void)data;
|
||||
RETURNC(PAM_CONV_ERR);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/openpam_restore_cred.c
vendored
1
dist/openpam/lib/openpam_restore_cred.c
vendored
@ -74,6 +74,7 @@ openpam_restore_cred(pam_handle_t *pamh)
|
||||
}
|
||||
pam_set_data(pamh, PAM_SAVED_CRED, NULL, NULL);
|
||||
RETURNC(PAM_SUCCESS);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/openpam_set_option.c
vendored
1
dist/openpam/lib/openpam_set_option.c
vendored
@ -101,6 +101,7 @@ openpam_set_option(pam_handle_t *pamh,
|
||||
cur->optv[i] = opt;
|
||||
}
|
||||
RETURNC(PAM_SUCCESS);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/openpam_ttyconv.c
vendored
1
dist/openpam/lib/openpam_ttyconv.c
vendored
@ -220,6 +220,7 @@ openpam_ttyconv(int n,
|
||||
FREE(aresp);
|
||||
*resp = NULL;
|
||||
RETURNC(PAM_CONV_ERR);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_acct_mgmt.c
vendored
1
dist/openpam/lib/pam_acct_mgmt.c
vendored
@ -56,6 +56,7 @@ pam_acct_mgmt(pam_handle_t *pamh,
|
||||
ENTER();
|
||||
r = openpam_dispatch(pamh, PAM_SM_ACCT_MGMT, flags);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_authenticate.c
vendored
1
dist/openpam/lib/pam_authenticate.c
vendored
@ -59,6 +59,7 @@ pam_authenticate(pam_handle_t *pamh,
|
||||
r = openpam_dispatch(pamh, PAM_SM_AUTHENTICATE, flags);
|
||||
pam_set_item(pamh, PAM_AUTHTOK, NULL);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_chauthtok.c
vendored
1
dist/openpam/lib/pam_chauthtok.c
vendored
@ -64,6 +64,7 @@ pam_chauthtok(pam_handle_t *pamh,
|
||||
pam_set_item(pamh, PAM_OLDAUTHTOK, NULL);
|
||||
pam_set_item(pamh, PAM_AUTHTOK, NULL);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_close_session.c
vendored
1
dist/openpam/lib/pam_close_session.c
vendored
@ -58,6 +58,7 @@ pam_close_session(pam_handle_t *pamh,
|
||||
RETURNC(PAM_SYMBOL_ERR);
|
||||
r = openpam_dispatch(pamh, PAM_SM_CLOSE_SESSION, flags);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_end.c
vendored
1
dist/openpam/lib/pam_end.c
vendored
@ -84,6 +84,7 @@ pam_end(pam_handle_t *pamh,
|
||||
FREE(pamh);
|
||||
|
||||
RETURNC(PAM_SUCCESS);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_get_authtok.c
vendored
1
dist/openpam/lib/pam_get_authtok.c
vendored
@ -128,6 +128,7 @@ pam_get_authtok(pam_handle_t *pamh,
|
||||
RETURNC(r);
|
||||
r = pam_get_item(pamh, item, (const void **)authtok);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_get_data.c
vendored
1
dist/openpam/lib/pam_get_data.c
vendored
@ -65,6 +65,7 @@ pam_get_data(pam_handle_t *pamh,
|
||||
}
|
||||
}
|
||||
RETURNC(PAM_NO_MODULE_DATA);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
2
dist/openpam/lib/pam_get_item.c
vendored
2
dist/openpam/lib/pam_get_item.c
vendored
@ -87,8 +87,10 @@ pam_get_item(pam_handle_t *pamh,
|
||||
case PAM_REPOSITORY:
|
||||
*item = pamh->item[item_type];
|
||||
RETURNC(PAM_SUCCESS);
|
||||
/*NOTREACHED*/
|
||||
default:
|
||||
RETURNC(PAM_SYMBOL_ERR);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
}
|
||||
|
||||
|
1
dist/openpam/lib/pam_get_user.c
vendored
1
dist/openpam/lib/pam_get_user.c
vendored
@ -83,6 +83,7 @@ pam_get_user(pam_handle_t *pamh,
|
||||
RETURNC(r);
|
||||
r = pam_get_item(pamh, PAM_USER, (const void **)user);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_getenv.c
vendored
1
dist/openpam/lib/pam_getenv.c
vendored
@ -69,6 +69,7 @@ pam_getenv(pam_handle_t *pamh,
|
||||
}
|
||||
}
|
||||
RETURNS(str);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
1
dist/openpam/lib/pam_getenvlist.c
vendored
1
dist/openpam/lib/pam_getenvlist.c
vendored
@ -77,6 +77,7 @@ pam_getenvlist(pam_handle_t *pamh)
|
||||
}
|
||||
envlist[i] = NULL;
|
||||
RETURNP(envlist);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
1
dist/openpam/lib/pam_open_session.c
vendored
1
dist/openpam/lib/pam_open_session.c
vendored
@ -58,6 +58,7 @@ pam_open_session(pam_handle_t *pamh,
|
||||
RETURNC(PAM_SYMBOL_ERR);
|
||||
r = openpam_dispatch(pamh, PAM_SM_OPEN_SESSION, flags);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_putenv.c
vendored
1
dist/openpam/lib/pam_putenv.c
vendored
@ -88,6 +88,7 @@ pam_putenv(pam_handle_t *pamh,
|
||||
RETURNC(PAM_BUF_ERR);
|
||||
++pamh->env_count;
|
||||
RETURNC(PAM_SUCCESS);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_set_data.c
vendored
1
dist/openpam/lib/pam_set_data.c
vendored
@ -81,6 +81,7 @@ pam_set_data(pam_handle_t *pamh,
|
||||
dp->next = pamh->module_data;
|
||||
pamh->module_data = dp;
|
||||
RETURNC(PAM_SUCCESS);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_set_item.c
vendored
1
dist/openpam/lib/pam_set_item.c
vendored
@ -101,6 +101,7 @@ pam_set_item(pam_handle_t *pamh,
|
||||
}
|
||||
*slot = tmp;
|
||||
RETURNC(PAM_SUCCESS);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_setcred.c
vendored
1
dist/openpam/lib/pam_setcred.c
vendored
@ -60,6 +60,7 @@ pam_setcred(pam_handle_t *pamh,
|
||||
/* XXX enforce exclusivity */
|
||||
r = openpam_dispatch(pamh, PAM_SM_SETCRED, flags);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_setenv.c
vendored
1
dist/openpam/lib/pam_setenv.c
vendored
@ -76,6 +76,7 @@ pam_setenv(pam_handle_t *pamh,
|
||||
r = pam_putenv(pamh, env);
|
||||
FREE(env);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_start.c
vendored
1
dist/openpam/lib/pam_start.c
vendored
@ -77,6 +77,7 @@ pam_start(const char *service,
|
||||
fail:
|
||||
pam_end(ph, r);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
1
dist/openpam/lib/pam_vprompt.c
vendored
1
dist/openpam/lib/pam_vprompt.c
vendored
@ -81,6 +81,7 @@ pam_vprompt(pam_handle_t *pamh,
|
||||
*resp = rsp == NULL ? NULL : rsp->resp;
|
||||
FREE(rsp);
|
||||
RETURNC(r);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user