diff options
author | 2011-12-30 13:12:26 +0000 | |
---|---|---|
committer | 2011-12-30 13:12:26 +0000 | |
commit | 5849d48de20e52618ed3595aac5d63e039632bd7 (patch) | |
tree | 46ce04aab82bf6753581c604fdbf105c65f43441 /paludis | |
parent | d69251ac733d1c80650bd5954daf1e92408dbd1d (diff) | |
download | paludis-5849d48de20e52618ed3595aac5d63e039632bd7.tar.gz paludis-5849d48de20e52618ed3595aac5d63e039632bd7.tar.xz |
Don't do strange things if a group doesn't exist
Diffstat (limited to 'paludis')
-rw-r--r-- | paludis/repositories/accounts/installed_accounts_id.cc | 2 |
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 c69aa2889..57f0b9066 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. */ |