Lines Matching refs:flags

33         UserDBFlags flags;  member
104 static UserDBIterator* userdb_iterator_new(LookupWhat what, UserDBFlags flags) { in userdb_iterator_new() argument
116 .flags = flags, in userdb_iterator_new()
117 .synthesize_root = !FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE), in userdb_iterator_new()
118 .synthesize_nobody = !FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE), in userdb_iterator_new()
153 VarlinkReplyFlags flags, in userdb_on_query_reply() argument
231 if (FLAGS_SET(flags, VARLINK_REPLY_CONTINUES)) in userdb_on_query_reply()
285 if (FLAGS_SET(flags, VARLINK_REPLY_CONTINUES)) in userdb_on_query_reply()
328 if (FLAGS_SET(flags, VARLINK_REPLY_CONTINUES)) in userdb_on_query_reply()
404 UserDBFlags flags) { in userdb_start_query() argument
414 if (FLAGS_SET(flags, USERDB_EXCLUDE_VARLINK)) in userdb_start_query()
437 …if ((flags & (USERDB_AVOID_MULTIPLEXER|USERDB_EXCLUDE_DYNAMIC_USER|USERDB_EXCLUDE_NSS|USERDB_EXCLU… in userdb_start_query()
470 if (FLAGS_SET(flags, USERDB_EXCLUDE_DYNAMIC_USER) && in userdb_start_query()
479 if ((flags & (USERDB_EXCLUDE_NSS|USERDB_AVOID_MULTIPLEXER)) && is_nss) in userdb_start_query()
484 if ((flags & (USERDB_EXCLUDE_DROPIN|USERDB_AVOID_MULTIPLEXER)) && is_dropin) in userdb_start_query()
620 int userdb_by_name(const char *name, UserDBFlags flags, UserRecord **ret) { in userdb_by_name() argument
633 iterator = userdb_iterator_new(LOOKUP_USER, flags); in userdb_by_name()
637 … r = userdb_start_query(iterator, "io.systemd.UserDatabase.GetUserRecord", false, query, flags); in userdb_by_name()
644 if (!FLAGS_SET(flags, USERDB_EXCLUDE_DROPIN) && !iterator->dropin_covered) { in userdb_by_name()
645 r = dropin_user_record_by_name(name, NULL, flags, ret); in userdb_by_name()
650 if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && !iterator->nss_covered) { in userdb_by_name()
656 … r = nss_user_record_by_name(name, !FLAGS_SET(flags, USERDB_SUPPRESS_SHADOW), ret); in userdb_by_name()
662 if (!FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE)) { in userdb_by_name()
673 int userdb_by_uid(uid_t uid, UserDBFlags flags, UserRecord **ret) { in userdb_by_uid() argument
686 iterator = userdb_iterator_new(LOOKUP_USER, flags); in userdb_by_uid()
690 … r = userdb_start_query(iterator, "io.systemd.UserDatabase.GetUserRecord", false, query, flags); in userdb_by_uid()
697 if (!FLAGS_SET(flags, USERDB_EXCLUDE_DROPIN) && !iterator->dropin_covered) { in userdb_by_uid()
698 r = dropin_user_record_by_uid(uid, NULL, flags, ret); in userdb_by_uid()
703 if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && !iterator->nss_covered) { in userdb_by_uid()
707 … r = nss_user_record_by_uid(uid, !FLAGS_SET(flags, USERDB_SUPPRESS_SHADOW), ret); in userdb_by_uid()
713 if (!FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE)) { in userdb_by_uid()
724 int userdb_all(UserDBFlags flags, UserDBIterator **ret) { in userdb_all() argument
730 iterator = userdb_iterator_new(LOOKUP_USER, flags); in userdb_all()
734 … qr = userdb_start_query(iterator, "io.systemd.UserDatabase.GetUserRecord", true, NULL, flags); in userdb_all()
736 if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && (qr < 0 || !iterator->nss_covered)) { in userdb_all()
745 if (!FLAGS_SET(flags, USERDB_EXCLUDE_DROPIN) && (qr < 0 || !iterator->dropin_covered)) { in userdb_all()
789 if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { in userdb_iterator_get()
839 r = dropin_user_record_by_uid(uid, i, iterator->flags, ret); in userdb_iterator_get()
893 int groupdb_by_name(const char *name, UserDBFlags flags, GroupRecord **ret) { in groupdb_by_name() argument
906 iterator = userdb_iterator_new(LOOKUP_GROUP, flags); in groupdb_by_name()
910 … r = userdb_start_query(iterator, "io.systemd.UserDatabase.GetGroupRecord", false, query, flags); in groupdb_by_name()
917 if (!FLAGS_SET(flags, USERDB_EXCLUDE_DROPIN) && !(iterator && iterator->dropin_covered)) { in groupdb_by_name()
918 r = dropin_group_record_by_name(name, NULL, flags, ret); in groupdb_by_name()
924 if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && !(iterator && iterator->nss_covered)) { in groupdb_by_name()
927 … r = nss_group_record_by_name(name, !FLAGS_SET(flags, USERDB_SUPPRESS_SHADOW), ret); in groupdb_by_name()
933 if (!FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE)) { in groupdb_by_name()
944 int groupdb_by_gid(gid_t gid, UserDBFlags flags, GroupRecord **ret) { in groupdb_by_gid() argument
957 iterator = userdb_iterator_new(LOOKUP_GROUP, flags); in groupdb_by_gid()
961 … r = userdb_start_query(iterator, "io.systemd.UserDatabase.GetGroupRecord", false, query, flags); in groupdb_by_gid()
968 if (!FLAGS_SET(flags, USERDB_EXCLUDE_DROPIN) && !(iterator && iterator->dropin_covered)) { in groupdb_by_gid()
969 r = dropin_group_record_by_gid(gid, NULL, flags, ret); in groupdb_by_gid()
974 if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && !(iterator && iterator->nss_covered)) { in groupdb_by_gid()
977 … r = nss_group_record_by_gid(gid, !FLAGS_SET(flags, USERDB_SUPPRESS_SHADOW), ret); in groupdb_by_gid()
983 if (!FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE)) { in groupdb_by_gid()
994 int groupdb_all(UserDBFlags flags, UserDBIterator **ret) { in groupdb_all() argument
1000 iterator = userdb_iterator_new(LOOKUP_GROUP, flags); in groupdb_all()
1004 … qr = userdb_start_query(iterator, "io.systemd.UserDatabase.GetGroupRecord", true, NULL, flags); in groupdb_all()
1006 if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && (qr < 0 || !iterator->nss_covered)) { in groupdb_all()
1015 if (!FLAGS_SET(flags, USERDB_EXCLUDE_DROPIN) && (qr < 0 || !iterator->dropin_covered)) { in groupdb_all()
1056 if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { in groupdb_iterator_get()
1104 r = dropin_group_record_by_gid(gid, i, iterator->flags, ret); in groupdb_iterator_get()
1137 static void discover_membership_dropins(UserDBIterator *i, UserDBFlags flags) { in discover_membership_dropins() argument
1150 int membershipdb_by_user(const char *name, UserDBFlags flags, UserDBIterator **ret) { in membershipdb_by_user() argument
1165 iterator = userdb_iterator_new(LOOKUP_MEMBERSHIP, flags); in membershipdb_by_user()
1173 … qr = userdb_start_query(iterator, "io.systemd.UserDatabase.GetMemberships", true, query, flags); in membershipdb_by_user()
1175 if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && (qr < 0 || !iterator->nss_covered)) { in membershipdb_by_user()
1184 if (!FLAGS_SET(flags, USERDB_EXCLUDE_DROPIN) && (qr < 0 || !iterator->dropin_covered)) in membershipdb_by_user()
1185 discover_membership_dropins(iterator, flags); in membershipdb_by_user()
1196 int membershipdb_by_group(const char *name, UserDBFlags flags, UserDBIterator **ret) { in membershipdb_by_group() argument
1211 iterator = userdb_iterator_new(LOOKUP_MEMBERSHIP, flags); in membershipdb_by_group()
1219 … qr = userdb_start_query(iterator, "io.systemd.UserDatabase.GetMemberships", true, query, flags); in membershipdb_by_group()
1221 if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && (qr < 0 || !iterator->nss_covered)) { in membershipdb_by_group()
1243 if (!FLAGS_SET(flags, USERDB_EXCLUDE_DROPIN) && (qr < 0 || !iterator->dropin_covered)) in membershipdb_by_group()
1244 discover_membership_dropins(iterator, flags); in membershipdb_by_group()
1255 int membershipdb_all(UserDBFlags flags, UserDBIterator **ret) { in membershipdb_all() argument
1261 iterator = userdb_iterator_new(LOOKUP_MEMBERSHIP, flags); in membershipdb_all()
1265 … qr = userdb_start_query(iterator, "io.systemd.UserDatabase.GetMemberships", true, NULL, flags); in membershipdb_all()
1267 if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && (qr < 0 || !iterator->nss_covered)) { in membershipdb_all()
1276 if (!FLAGS_SET(flags, USERDB_EXCLUDE_DROPIN) && (qr < 0 || !iterator->dropin_covered)) in membershipdb_all()
1277 discover_membership_dropins(iterator, flags); in membershipdb_all()
1420 int membershipdb_by_group_strv(const char *name, UserDBFlags flags, char ***ret) { in membershipdb_by_group_strv() argument
1428 r = membershipdb_by_group(name, flags, &iterator); in membershipdb_by_group_strv()