Re: GNOME Shell startup app issue with /tmp
On Sat, 16 Jan 2021 08:44:54 -0600, Michael Catanzaro wrote: > > Most likely you want to use $XDG_RUNTIME_DIR instead, which is private > > to your user, and not shared with other users. Use glib's > > g_get_user_runtime_dir() as a wrapper for accessing that variable. > > Or g_dir_make_tmp() No. The created tmp directory must be known to any other CM instances, and using a mkdtemp variant is not applicable in that case. But Lennart's suggest of g_get_user_runtime_dir() is plausible. I've sent a question about that to upstream devs. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: GNOME Shell startup app issue with /tmp
On Sat, 16 Jan 2021 15:34:44 +0100, Lennart Poettering wrote: > Regardless of the actual issue ran into: taking a predictable name > like that in /tmp/ is a DoS vulnerability. /tmp/ is a shared > namespace, any local program can take any name in there, and hence > block you out from starting Claws mail — simply by creating a file or > directory by that name there under their own ownership. That would be a mostly theoretical/academical attack vector, since Claws Mail refusing to start and printing an error message would alert the user, and the user could take proper action against the attacker. > Most likely you want to use $XDG_RUNTIME_DIR instead, which is private > to your user, and not shared with other users. Use glib's > g_get_user_runtime_dir() as a wrapper for accessing that variable. From the Claws Mail FAQ: | Why does Claws Mail allow me to open more than one instance at the same | time for the same user on a network? | | Claws Mail opens a Unix-domain socket using a name constucted from your | TMPDIR path plus your UID. This socket is used to arbitrate multiple | instances on a given machine. In Linux, at least, named Unix-domain | sockets are known only locally, to the creating machine. Pointing your | TMPDIR environment variable to /home/yours/tmp doesn't have the desired | effect, as the socket definition would need to be propagated across the | LAN and isn't. | | Setting an alternate configuration directory (--alternate-config-dir | option) overrides TMPDIR value and places the socket under the alternate | directory. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: GNOME Shell startup app issue with /tmp
On Sat, Jan 16, 2021 at 3:34 pm, Lennart Poettering wrote: Most likely you want to use $XDG_RUNTIME_DIR instead, which is private to your user, and not shared with other users. Use glib's g_get_user_runtime_dir() as a wrapper for accessing that variable. Or g_dir_make_tmp() ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: GNOME Shell startup app issue with /tmp
On Sa, 16.01.21 13:56, Michael Schwendt (mschwe...@gmail.com) wrote: > Noticed that when setting Claws Mail to become a startup app in F33 > GNOME Shell, it doesn't create its /tmp/claws-mail-$UID directory. Regardless of the actual issue ran into: taking a predictable name like that in /tmp/ is a DoS vulnerability. /tmp/ is a shared namespace, any local program can take any name in there, and hence block you out from starting Claws mail — simply by creating a file or directory by that name there under their own ownership. Most likely you want to use $XDG_RUNTIME_DIR instead, which is private to your user, and not shared with other users. Use glib's g_get_user_runtime_dir() as a wrapper for accessing that variable. Lennart -- Lennart Poettering, Berlin ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: GNOME Shell startup app issue with /tmp
On Sat, Jan 16, 2021 at 01:56:26PM +0100, Michael Schwendt wrote: > Claws Mail relies on g_get_tmp_dir() for retrieval of the path, so it seems > when the program is launched, either /tmp doesn't exist yet or there are > problems creating files in it. systemd sets up the file system very early on, so at the time when a user session is running, /tmp has been in place for a while. > /tmp/claws-mail-$UID I filed a separate bug, https://bugzilla.redhat.com/show_bug.cgi?id=1917005. Zbyszek ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
GNOME Shell startup app issue with /tmp
Noticed that when setting Claws Mail to become a startup app in F33 GNOME Shell, it doesn't create its /tmp/claws-mail-$UID directory. Claws Mail relies on g_get_tmp_dir() for retrieval of the path, so it seems when the program is launched, either /tmp doesn't exist yet or there are problems creating files in it. Has anything changed related to the GNOME startup app procedure? ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org