Lines Matching refs:ret
409 int r, ret = 0; in userdb_start_query() local
509 if (ret == 0 && r < 0) in userdb_start_query()
510 ret = r; in userdb_start_query()
514 …return ret < 0 ? ret : -ESRCH; /* propagate last error we saw if we couldn't connect to anything. … in userdb_start_query()
599 static int synthetic_root_user_build(UserRecord **ret) { in synthetic_root_user_build() argument
601 ret, in synthetic_root_user_build()
609 static int synthetic_nobody_user_build(UserRecord **ret) { in synthetic_nobody_user_build() argument
611 ret, in synthetic_nobody_user_build()
620 int userdb_by_name(const char *name, UserDBFlags flags, UserRecord **ret) { in userdb_by_name() argument
639 r = userdb_process(iterator, ret, NULL, NULL, NULL); in userdb_by_name()
645 r = dropin_user_record_by_name(name, NULL, flags, ret); in userdb_by_name()
656 … r = nss_user_record_by_name(name, !FLAGS_SET(flags, USERDB_SUPPRESS_SHADOW), ret); in userdb_by_name()
664 return synthetic_root_user_build(ret); in userdb_by_name()
667 return synthetic_nobody_user_build(ret); in userdb_by_name()
673 int userdb_by_uid(uid_t uid, UserDBFlags flags, UserRecord **ret) { in userdb_by_uid() argument
692 r = userdb_process(iterator, ret, NULL, NULL, NULL); in userdb_by_uid()
698 r = dropin_user_record_by_uid(uid, NULL, flags, ret); in userdb_by_uid()
707 … r = nss_user_record_by_uid(uid, !FLAGS_SET(flags, USERDB_SUPPRESS_SHADOW), ret); in userdb_by_uid()
715 return synthetic_root_user_build(ret); in userdb_by_uid()
718 return synthetic_nobody_user_build(ret); in userdb_by_uid()
724 int userdb_all(UserDBFlags flags, UserDBIterator **ret) { in userdb_all() argument
728 assert(ret); in userdb_all()
762 *ret = TAKE_PTR(iterator); in userdb_all()
766 int userdb_iterator_get(UserDBIterator *iterator, UserRecord **ret) { in userdb_iterator_get() argument
800 r = nss_passwd_to_user_record(pw, r >= 0 ? &spwd : NULL, ret); in userdb_iterator_get()
804 if (ret) in userdb_iterator_get()
805 (*ret)->incomplete = incomplete; in userdb_iterator_get()
839 r = dropin_user_record_by_uid(uid, i, iterator->flags, ret); in userdb_iterator_get()
853 r = userdb_process(iterator, ret, NULL, NULL, NULL); in userdb_iterator_get()
860 return synthetic_root_user_build(ret); in userdb_iterator_get()
866 return synthetic_nobody_user_build(ret); in userdb_iterator_get()
877 static int synthetic_root_group_build(GroupRecord **ret) { in synthetic_root_group_build() argument
879 ret, in synthetic_root_group_build()
885 static int synthetic_nobody_group_build(GroupRecord **ret) { in synthetic_nobody_group_build() argument
887 ret, in synthetic_nobody_group_build()
893 int groupdb_by_name(const char *name, UserDBFlags flags, GroupRecord **ret) { in groupdb_by_name() argument
912 r = userdb_process(iterator, NULL, ret, NULL, NULL); in groupdb_by_name()
918 r = dropin_group_record_by_name(name, NULL, flags, ret); in groupdb_by_name()
927 … r = nss_group_record_by_name(name, !FLAGS_SET(flags, USERDB_SUPPRESS_SHADOW), ret); in groupdb_by_name()
935 return synthetic_root_group_build(ret); in groupdb_by_name()
938 return synthetic_nobody_group_build(ret); in groupdb_by_name()
944 int groupdb_by_gid(gid_t gid, UserDBFlags flags, GroupRecord **ret) { in groupdb_by_gid() argument
963 r = userdb_process(iterator, NULL, ret, NULL, NULL); in groupdb_by_gid()
969 r = dropin_group_record_by_gid(gid, NULL, flags, ret); in groupdb_by_gid()
977 … r = nss_group_record_by_gid(gid, !FLAGS_SET(flags, USERDB_SUPPRESS_SHADOW), ret); in groupdb_by_gid()
985 return synthetic_root_group_build(ret); in groupdb_by_gid()
988 return synthetic_nobody_group_build(ret); in groupdb_by_gid()
994 int groupdb_all(UserDBFlags flags, UserDBIterator **ret) { in groupdb_all() argument
998 assert(ret); in groupdb_all()
1031 *ret = TAKE_PTR(iterator); in groupdb_all()
1035 int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { in groupdb_iterator_get() argument
1067 r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); in groupdb_iterator_get()
1071 if (ret) in groupdb_iterator_get()
1072 (*ret)->incomplete = incomplete; in groupdb_iterator_get()
1104 r = dropin_group_record_by_gid(gid, i, iterator->flags, ret); in groupdb_iterator_get()
1115 r = userdb_process(iterator, NULL, ret, NULL, NULL); in groupdb_iterator_get()
1120 return synthetic_root_group_build(ret); in groupdb_iterator_get()
1126 return synthetic_nobody_group_build(ret); in groupdb_iterator_get()
1150 int membershipdb_by_user(const char *name, UserDBFlags flags, UserDBIterator **ret) { in membershipdb_by_user() argument
1155 assert(ret); in membershipdb_by_user()
1192 *ret = TAKE_PTR(iterator); in membershipdb_by_user()
1196 int membershipdb_by_group(const char *name, UserDBFlags flags, UserDBIterator **ret) { in membershipdb_by_group() argument
1201 assert(ret); in membershipdb_by_group()
1251 *ret = TAKE_PTR(iterator); in membershipdb_by_group()
1255 int membershipdb_all(UserDBFlags flags, UserDBIterator **ret) { in membershipdb_all() argument
1259 assert(ret); in membershipdb_all()
1284 *ret = TAKE_PTR(iterator); in membershipdb_all()
1420 int membershipdb_by_group_strv(const char *name, UserDBFlags flags, char ***ret) { in membershipdb_by_group_strv() argument
1426 assert(ret); in membershipdb_by_group_strv()
1449 *ret = TAKE_PTR(members); in membershipdb_by_group_strv()