Right, it's logical to clean up the icon as well. (Guest users typically don't bother with icons, which explains why I missed it.)
Maybe checking errno would provide sufficient safety? errno = 0; pwent = getpwnam (name); if (pwent == NULL && errno == 0) { -- You received this bug notification because you are a member of DX Packages, which is subscribed to accountsservice in Ubuntu. Matching subscriptions: dx-packages https://bugs.launchpad.net/bugs/1259562 Title: Old guest users pollute accountsservice Status in D-Bus interfaces for querying and manipulating user account information: Confirmed Status in Light Display Manager: Triaged Status in “accountsservice” package in Ubuntu: Fix Released Status in “lightdm” package in Ubuntu: Triaged Bug description: When you log out from a guest session, the temporary guest account is removed - but only almost. The folder /var/lib/AccountsService/users gets 'polluted' with files for previous guest users. To manage notifications about this bug go to: https://bugs.launchpad.net/accountsservice/+bug/1259562/+subscriptions -- Mailing list: https://launchpad.net/~dx-packages Post to : dx-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~dx-packages More help : https://help.launchpad.net/ListHelp