From 6d78e11e17b80bc932e5f4fb1ff6b27909f405d0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 30 Aug 2010 14:00:50 +1000 Subject: libcli/security make sec_privilege_id() return SEC_PRIV_INVALID on failure. Andrew Bartlett Signed-off-by: Andrew Tridgell --- source4/rpc_server/lsa/dcesrv_lsa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/rpc_server/lsa') diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index 988acda10b..dedb21cd39 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -2458,7 +2458,7 @@ static NTSTATUS dcesrv_lsa_EnumPrivsAccount(struct dcesrv_call_state *dce_call, for (i=0;inum_values;i++) { int id = sec_privilege_id((const char *)el->values[i].data); - if (id == -1) { + if (id == SEC_PRIV_INVALID) { return NT_STATUS_INTERNAL_DB_CORRUPTION; } privs->set[i].attribute = 0; @@ -2584,7 +2584,7 @@ static NTSTATUS dcesrv_lsa_AddRemoveAccountRights(struct dcesrv_call_state *dce_ } for (i=0;icount;i++) { - if (sec_privilege_id(rights->names[i].string) == -1) { + if (sec_privilege_id(rights->names[i].string) == SEC_PRIV_INVALID) { talloc_free(msg); return NT_STATUS_NO_SUCH_PRIVILEGE; } @@ -3385,7 +3385,7 @@ static NTSTATUS dcesrv_lsa_LookupPrivValue(struct dcesrv_call_state *dce_call, state = h->data; id = sec_privilege_id(r->in.name->string); - if (id == -1) { + if (id == SEC_PRIV_INVALID) { return NT_STATUS_NO_SUCH_PRIVILEGE; } @@ -3451,7 +3451,7 @@ static NTSTATUS dcesrv_lsa_LookupPrivDisplayName(struct dcesrv_call_state *dce_c state = h->data; id = sec_privilege_id(r->in.name->string); - if (id == -1) { + if (id == SEC_PRIV_INVALID) { return NT_STATUS_NO_SUCH_PRIVILEGE; } @@ -3495,7 +3495,7 @@ static NTSTATUS dcesrv_lsa_EnumAccountsWithUserRight(struct dcesrv_call_state *d } privname = r->in.name->string; - if (sec_privilege_id(privname) == -1) { + if (sec_privilege_id(privname) == SEC_PRIV_INVALID) { return NT_STATUS_NO_SUCH_PRIVILEGE; } -- cgit