summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-12-13 12:09:56 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-13 20:46:25 +0100
commit9bdb93119ceaf9e2bbcec0c0a4747f1a04b48a12 (patch)
treebd6538dd886c7316a74b0b5a341f82a8fcdeb1cf /src
parenta5ccff776edfa776b8846f62a161aaf358e17b66 (diff)
downloadsssd-9bdb93119ceaf9e2bbcec0c0a4747f1a04b48a12.tar.gz
sssd-9bdb93119ceaf9e2bbcec0c0a4747f1a04b48a12.tar.bz2
sssd-9bdb93119ceaf9e2bbcec0c0a4747f1a04b48a12.zip
sysdb_get_sudo_user_info() initialize attrs on declaration
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb_sudo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c
index 39b1504d..9e849ddb 100644
--- a/src/db/sysdb_sudo.c
+++ b/src/db/sysdb_sudo.c
@@ -290,19 +290,18 @@ sysdb_get_sudo_user_info(TALLOC_CTX *mem_ctx, const char *username,
{
TALLOC_CTX *tmp_ctx;
errno_t ret;
- const char *attrs[3];
struct ldb_message *msg;
char **sysdb_groupnames = NULL;
struct ldb_message_element *groups;
uid_t uid = 0;
int i;
+ const char *attrs[] = { SYSDB_MEMBEROF,
+ SYSDB_UIDNUM,
+ NULL };
tmp_ctx = talloc_new(NULL);
NULL_CHECK(tmp_ctx, ret, done);
- attrs[0] = SYSDB_MEMBEROF;
- attrs[1] = SYSDB_UIDNUM;
- attrs[2] = NULL;
ret = sysdb_search_user_by_name(tmp_ctx, sysdb, username,
attrs, &msg);
if (ret != EOK) {