aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-12-30 13:12:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-12-30 13:12:26 +0000
commit5849d48de20e52618ed3595aac5d63e039632bd7 (patch)
tree46ce04aab82bf6753581c604fdbf105c65f43441
parentd69251ac733d1c80650bd5954daf1e92408dbd1d (diff)
downloadpaludis-5849d48de20e52618ed3595aac5d63e039632bd7.tar.gz
paludis-5849d48de20e52618ed3595aac5d63e039632bd7.tar.xz
Don't do strange things if a group doesn't exist
-rw-r--r--paludis/repositories/accounts/installed_accounts_id.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/paludis/repositories/accounts/installed_accounts_id.cc b/paludis/repositories/accounts/installed_accounts_id.cc
index c69aa28..57f0b90 100644
--- a/paludis/repositories/accounts/installed_accounts_id.cc
+++ b/paludis/repositories/accounts/installed_accounts_id.cc
@@ -143,7 +143,7 @@ InstalledAccountsID::need_keys_added() const
struct group grp;
struct group * grp_result;
- if (0 == getgrgid_r(pwd.pw_gid, &grp, &grp_buf[0], grp_buf_sz, &grp_result))
+ if (0 == getgrgid_r(pwd.pw_gid, &grp, &grp_buf[0], grp_buf_sz, &grp_result) && 0 != grp_result)
{
/* really we should only do this if the group in question is managed by accounts. users
* might have accounts installed by hand with a group that's unmanaged. */