summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-31 09:28:51 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-11 18:46:11 +1000
commita32cdadb7cbff255b5a0133a3bb54352d0d42f61 (patch)
tree8d8ac093e65941ebd57ced9a8f30f991fbcb4c6c /source4
parent0b41ef789575e5194e9b499cf5fe0df4616f1bb8 (diff)
downloadsamba-a32cdadb7cbff255b5a0133a3bb54352d0d42f61.tar.gz
samba-a32cdadb7cbff255b5a0133a3bb54352d0d42f61.tar.bz2
samba-a32cdadb7cbff255b5a0133a3bb54352d0d42f61.zip
libcli/security Make sec_privilege_from_index() return SEC_PRIV_INVALID on failure
This is clearer and more consistent than using a magic -1 return Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c2
1 files changed, 1 insertions, 1 deletions
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);