summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/polkitmateauthenticationdialog.c4
-rw-r--r--src/polkitmateauthenticator.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/src/polkitmateauthenticationdialog.c b/src/polkitmateauthenticationdialog.c
index 13123f2..14edc0e 100644
--- a/src/polkitmateauthenticationdialog.c
+++ b/src/polkitmateauthenticationdialog.c
@@ -650,7 +650,7 @@ polkit_mate_authentication_dialog_constructed (GObject *object)
GtkWidget *content_area;
gboolean have_user_combobox;
gchar *s;
- guint rows;
+ gint rows;
dialog = POLKIT_MATE_AUTHENTICATION_DIALOG (object);
@@ -791,7 +791,7 @@ polkit_mate_authentication_dialog_constructed (GObject *object)
rows = 0;
if (dialog->priv->details != NULL)
{
- guint n;
+ gint n;
gchar **keys;
keys = polkit_details_get_keys (dialog->priv->details);
diff --git a/src/polkitmateauthenticator.c b/src/polkitmateauthenticator.c
index 1ce8cc6..94f78c1 100644
--- a/src/polkitmateauthenticator.c
+++ b/src/polkitmateauthenticator.c
@@ -243,11 +243,14 @@ polkit_mate_authenticator_new (const gchar *action_id,
for (l = authenticator->identities, n = 0; l != NULL; l = l->next, n++)
{
PolkitUnixUser *user = POLKIT_UNIX_USER (l->data);
- uid_t uid;
+ gint uid;
struct passwd *passwd;
uid = polkit_unix_user_get_uid (user);
- passwd = getpwuid (uid);
+ if (uid == -1)
+ continue;
+
+ passwd = getpwuid ((uid_t) uid);
authenticator->users[n] = g_strdup (passwd->pw_name);
}