Path: csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod From: Reco Newsgroups: linux.debian.user Subject: Re: How to change default umask in Stretch? Date: Thu, 10 Aug 2017 07:20:01 +0200 Message-ID: References: X-Mailbox-Line: From debian-user-request@lists.debian.org Thu Aug 10 05:17:09 2017 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.099 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -7 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=6saI5Uz4yha1Nf9/cR1XX2mNs64GBmoTyomm41OcKSw=; b=gaEkqh81ZQC8HrOilZYmIAwuIFeDRkJVxRCG6oKK0/yYOydM4/TbAkyfyiZc5klgjZ oDCD/UBWmOCQuP0rgZTKa7CMiLywCPWJyv8dLBYLJ/TJZ6EOU/3WMeMBw0hC4fqW4kBM VFb0ozAyAVGCMX4sCbvhT5Cury0zzkxBOcl0bouRZpx97u1OB06Zmq6WbNejJaZBSDOE MTMy8BoLFILIDVesrzJLEnOcMdu3imGBySvQVhYCRbHnGmUsun3AnZcUrFrfAwRVjMJG ebx79SihVRbcbf4/a4MpxI8ulLHBk4dUOi3qMUawdwIspaCtPvg7VciNRGgkUJ76V8PI aGxw== X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6saI5Uz4yha1Nf9/cR1XX2mNs64GBmoTyomm41OcKSw=; b=lGXY/PUuOP8v1jc6I4BnekqSJZdkX0zXymjeC72SswSR5ehPD4Fpy9KW9flsIgWVEc ipBcMCtkgT7HlAV5QEKiGQpJh3Lp0vIXlh4/FeUYw9UUVH6nyIDEFEvlPngI9j0GXdpY dr/9iK8SvfGlaKDgDfC9IqNyd6oIh3ArqtIBoexBRyjvhR+V65mYnhmGAJoJftCBnYIS YAYc7VgpSiJS2CDKjvkuD5ff1bDvQXPEcetMrEptMPYl/ArtMm2Xk//JxfU9kbTwsGpT UA0FhGxp7b3gBf0DWGn9l/+30ry91jYB3ezi+jLNXrXpjCoc4cm1+R6jwdOng3is/Beu r44w== X-Gm-Message-State: AHYfb5ibUnfXHBmtEo+dthj4OY9nIxZgkISdcmoSfxZ38stbKOk6yT8N qMVkFat4bqJzazLN X-Received: by 10.223.154.105 with SMTP id z96mr6875979wrb.73.1502342214015; Wed, 09 Aug 2017 22:16:54 -0700 (PDT) X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailing-List: archive/latest/724625 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20170810081648.ae8f5489b1625659891c4b83@gmail.com Approved: robomod@news.nic.it Lines: 38 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 10 Aug 2017 08:16:48 +0300 X-Original-Message-ID: <20170810081648.ae8f5489b1625659891c4b83@gmail.com> X-Original-References: <20170807153724.b74atlhhxsd25ano@eeg.ccf.org> <1862083783.174371.1502120934723.JavaMail.zimbra@unseen.is> <20170807171102.2mr3lvgj323y4b5n@ddeb.ddeb.net> <1095917548.175515.1502126337319.JavaMail.zimbra@unseen.is> <20170807180037.2xg6aj6zhqpftf7v@ddeb.ddeb.net> <2085794334.176148.1502129247453.JavaMail.zimbra@unseen.is> <20170807183230.mxe2zf7fxel4a3bf@ddeb.ddeb.net> <937385642.179594.1502136010435.JavaMail.zimbra@unseen.is> <20170807204748.GB8557@alum> <20170808102701.m2oaxifdjtjtwjs7@e1030> <20170809120915.eesnfrcyailt2ssn@eeg.ccf.org> Xref: csiph.com linux.debian.user:184970 Hi. An update for the archives. On Wed, 9 Aug 2017 08:09:16 -0400 Greg Wooledge wrote: > On Tue, Aug 08, 2017 at 01:27:02PM +0300, Reco wrote: > > Or find gnome-session (or gnome-shell - I don't recall who exactly > > spawns user applications in GNOME) process pid, execute something like > > this on login: > > > > gdb -p $(pidof gnome-session) -ex 'p umask(0077)' --batch > > > > You'll need gdb to be installed, of course. > > It's beginning to sound like GNOME applications aren't even launched > by GNOME at all, but rather by systemd/dbus. Somehow. Couple of experiments later, which involved strace, ltrace *and* auditctl I confirm that GNOME applications are launched by dbus-daemon indeed. Not 'system' one, but 'session' dbus-daemon. If you do it via gnome-shell anyway. > I'd be interested in hearing the results of your gdb experiment being > performed on the user session dbus daemon process, by someone using > GNOME. I have no idea whether it would actually work, but if it does, > that would help us understand how this... desktop... is put together. So, once I pinpointed spawning process, I poked it with gdb and it changed the umask. So, correct hack for the umask in GNOME (as of stretch) is: gdb -p $(pgrep -U $(id -u) -f '/usr/bin/dbus-daemon --fork') \ -ex 'p umask(0077)' --batch Reco