Bug#743215: write: you are uid ???, but your login is as uid 0

2016-03-23 Thread Michael Meskes
> I am astounded at your inability to understand this.

You're joking, right? Or else I feel offended. You do not care to give
*any* description as to what doesn't work in which case and you blame
me of not miraculously understand what problem you see.

Fortunately for all of us, Yuri was so nice to give a use case that a)
shows the problem and b) is reproducible. While yours

> # su -c 'write root' | cat

is not. I tried this as root or as a normal user and it just works.

> will fail because write is running as bin and checks who owns 

Why would write be running as bin?

> There's a breaking change in systemd's cron where the standard output
> spooler is now owned by root rather than the runas user. write is
> checking for this and falling down.

That one I tried to reproduce but could not as well.

> Yes, pipes have owners. If you know what fstat() does you know this.

This just added to offend me some more?

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL



Bug#743215: write: you are uid ???, but your login is as uid 0

2016-03-22 Thread Joshua Hudson
I am astounded at your inability to understand this.

# su -c 'write root' | cat

will fail because write is running as bin and checks who owns standard
output for a match or not. Now this is a pretty perverse example.

There's a breaking change in systemd's cron where the standard output
spooler is now owned by root rather than the runas user. write is
checking for this and falling down.

Yes, pipes have owners. If you know what fstat() does you know this.



Bug#743215: write: you are uid ???, but your login is as uid 0

2016-03-19 Thread Yuri D'Elia
On Sat, Mar 19 2016, Michael Meskes  wrote:
> This is my second and last try. Could one of you please, pretty please,
> describe the bug and explain what does not work although it should, ideally in
> a way that makes it possible for me to reproduce it? So far, this bug report
> has nothing to work with.

If you did ask before, I didn't receive anything.

But anyway, it's easy. To get exactly the same behavior, on sid, login
as root. Then:

sudo -u user write user

Where "user" is any username of a valid, logged-in account with messages
enabled.

Do you agree here, that write shouldn't prevent me to write to myself in
this case? Pretty obvious.

Where this behavior actually happens you ask? I want to notify myself
when running in a cron job. Or at completion of scripts in batch
scripts, or job schedulers, or anything that changes username for any
reason whatsoever.

If I didn't want messages, I would turn them off (which is the default
anyway).

Now, the bigger picture is that the check itself is bogus.
Write shouldn't care about the original uid at all. What exactly is this
check preventing?

I hope this is clear now.



Bug#743215: write: you are uid ???, but your login is as uid 0

2016-03-19 Thread Michael Meskes
This is my second and last try. Could one of you please, pretty please,
describe the bug and explain what does not work although it should, ideally in
a way that makes it possible for me to reproduce it? So far, this bug report
has nothing to work with.

Michael

-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL



Bug#743215: write: you are uid ???, but your login is as uid 0

2015-10-15 Thread Yuri D'Elia
Package: bsdmainutils
Version: 9.0.6
Followup-For: Bug #743215

I'm not sure I follow. Does write actually need uid/euid for anything more than
determing the sender of the message?

The recipient is already specified manually.

Talk (or was it ntalk?) display simply "*unknown user*" when the username of the
sender cannot be identified unambiguosly, and that would be absolutely fine.

I generally wanted to (and use) "write" for opportunistic notification of batch
events. write shouldn't fail for such petty reasons, since I could just spam
all TTYs manually in any case.

Just write the PID/uid if the username is bogus.



Bug#743215: write: you are uid ???, but your login is as uid 0

2015-01-11 Thread Michael Meskes
On Tue, Jan 06, 2015 at 10:23:27AM +, Chris wrote:
 I am experiencing this problem since upgrading from Wheezy to Jessie. Is
 there any possibility of a fix?

I am still trying to figure out why this change was added. But I'd also like to 
learn why you only recently ran into problems with it. AFAICT this change was 
introduced prior to version 6.1.6 which is really old. Or in other words it has 
been in Wheezy, too.

 Until now I have relied on write to facilitate quickly passing information
 between users, though it's looking like I'll need to find a new tool for
 this.

Sorry, don't understand. You might want to elaborate on what stopped working.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#743215: write: you are uid ???, but your login is as uid 0

2015-01-06 Thread Chris
I am experiencing this problem since upgrading from Wheezy to Jessie. Is 
there any possibility of a fix?


Until now I have relied on write to facilitate quickly passing 
information between users, though it's looking like I'll need to find a 
new tool for this.


Chris


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#743215: write: you are uid ???, but your login is as uid 0

2014-10-22 Thread Yuri D'Elia
Package: bsdmainutils
Version: 9.0.6
Followup-For: Bug #743215

This issue is still affecting me.
This check prevents write(1) to be used in cron/batch/slurm scripts.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#743215: write: you are uid ???, but your login is as uid 0

2014-04-22 Thread Yuri D'Elia
Package: bsdmainutils
Version: 9.0.5
Followup-For: Bug #743215

I'd like to point out this is actually Debian-specific behavior (the original
source doesn't have this restriction).

Could somebody address as to why this check was put in place?


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#743215: write: you are uid ???, but your login is as uid 0

2014-03-31 Thread Yuri D'Elia
Package: bsdmainutils
Version: 9.0.5
Severity: minor

write(1) refuses to write when eid/uid are different:

write: you are uid 1001, but your login is as uid 0

Yes, but why would it matter when uid=0?


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org