}
-int commonio_unlock (struct commonio_db *db)
+int commonio_unlock (struct commonio_db *db, bool process_selinux)
{
char lock[1029];
if (db->isopen) {
db->readonly = true;
- if (commonio_close (db, true) == 0) {
+ if (commonio_close (db, process_selinux) == 0) {
if (db->locked) {
dec_lock_count ();
}
extern int commonio_rewind (struct commonio_db *);
extern /*@observer@*/ /*@null@*/const void *commonio_next (struct commonio_db *);
extern int commonio_close (struct commonio_db *, bool);
-extern int commonio_unlock (struct commonio_db *);
+extern int commonio_unlock (struct commonio_db *, bool);
extern void commonio_del_entry (struct commonio_db *,
const struct commonio_entry *);
extern int commonio_sort_wrt (struct commonio_db *shadow,
int gr_unlock (void)
{
- return commonio_unlock (&group_db);
+ return commonio_unlock (&group_db, true);
}
void __gr_set_changed (void)
int pw_unlock (void)
{
- return commonio_unlock (&passwd_db);
+ return commonio_unlock (&passwd_db, true);
}
/*@null@*/struct commonio_entry *__pw_get_head (void)
int sgr_unlock (void)
{
- return commonio_unlock (&gshadow_db);
+ return commonio_unlock (&gshadow_db, true);
}
void __sgr_set_changed (void)
if (!getdef_bool ("USE_TCB")) {
#endif /* WITH_TCB */
- return commonio_unlock (&shadow_db);
+ return commonio_unlock (&shadow_db, true);
#ifdef WITH_TCB
}
if (shadowtcb_drop_priv () == SHADOWTCB_FAILURE) {
int sub_uid_unlock (void)
{
- return commonio_unlock (&subordinate_uid_db);
+ return commonio_unlock (&subordinate_uid_db, true);
}
uid_t sub_uid_find_free_range(uid_t min, uid_t max, unsigned long count)
int sub_gid_unlock (void)
{
- return commonio_unlock (&subordinate_gid_db);
+ return commonio_unlock (&subordinate_gid_db, true);
}
gid_t sub_gid_find_free_range(gid_t min, gid_t max, unsigned long count)