}
else if (g_strcmp0 (attr, "uidNumber") == 0)
{
- gtk_list_store_set (lstore_users, &iter,
- COL_USERS_UID, strtol (vals[0]->bv_val, NULL, 10),
- -1);
+ if (strtol (vals[0]->bv_val, NULL, 10) < 1000)
+ {
+ /* system's user */
+ /* undo the insertion */
+ gtk_list_store_remove (lstore_users, &iter);
+ break;
+ }
+ else
+ {
+ gtk_list_store_set (lstore_users, &iter,
+ COL_USERS_UID, strtol (vals[0]->bv_val, NULL, 10),
+ -1);
+ }
}
}
ldap_value_free_len (vals);
}
ldap_memfree (attr);
}
- if (ber != NULL)
- {
- ber_free (ber, 0);
- }
+ if (ber != NULL)
+ {
+ ber_free (ber, 0);
+ }
+
entry = ldap_next_entry (ldap, entry);
}
}
}
else if (g_strcmp0 (attr, "gidNumber") == 0)
{
- gtk_list_store_set (lstore_groups, &iter,
- COL_GROUPS_GID, strtol (vals[0]->bv_val, NULL, 10),
- -1);
+ if (strtol (vals[0]->bv_val, NULL, 10) < 1000)
+ {
+ /* system's group */
+ /* undo the insertion */
+ gtk_list_store_remove (lstore_groups, &iter);
+ break;
+ }
+ else
+ {
+ gtk_list_store_set (lstore_groups, &iter,
+ COL_GROUPS_GID, strtol (vals[0]->bv_val, NULL, 10),
+ -1);
+ }
}
}
ldap_value_free_len (vals);
}
ldap_memfree (attr);
}
- if (ber != NULL)
- {
- ber_free (ber, 0);
- }
+ if (ber != NULL)
+ {
+ ber_free (ber, 0);
+ }
+
entry = ldap_next_entry (ldap, entry);
}
}