diff options
-rw-r--r-- | libcli/security/privileges.c | 2 | ||||
-rw-r--r-- | source4/rpc_server/lsa/dcesrv_lsa.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libcli/security/privileges.c b/libcli/security/privileges.c index 5c33f04693..f5fa836472 100644 --- a/libcli/security/privileges.c +++ b/libcli/security/privileges.c @@ -379,7 +379,7 @@ enum sec_privilege sec_privilege_from_index(int idx) if (idx >= 0 && idx<ARRAY_SIZE(privs)) { return privs[idx].luid; } - return -1; + return SEC_PRIV_INVALID; } /* diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index dedb21cd39..0a304d380c 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -300,7 +300,7 @@ static NTSTATUS dcesrv_lsa_EnumPrivs(struct dcesrv_call_state *dce_call, TALLOC_ i = *r->in.resume_handle; - while (((priv = sec_privilege_from_index(i)) != -1) && + while (((priv = sec_privilege_from_index(i)) != SEC_PRIV_INVALID) && r->out.privs->count < r->in.max_count) { struct lsa_PrivEntry *e; privname = sec_privilege_name(priv); |