[issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo

2021-07-09 Thread Ned Deily


Change by Ned Deily :


--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> syslog: Default "ident" in syslog.openlog() shouldn't contain 
slash
versions: +Python 3.9 -Python 3.5, Python 3.6, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo

2021-07-06 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

This was fixed in https://github.com/python/cpython/pull/16557 , so can be 
closed.

--
nosy: +andrei.avk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo

2021-02-22 Thread Hans Deragon


Change by Hans Deragon :


--
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo

2016-08-27 Thread SilentGhost

Changes by SilentGhost :


--
components: +Extension Modules
nosy: +jafo
stage:  -> needs patch
versions: +Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo

2016-08-27 Thread Fabian Pietsch

New submission from Fabian Pietsch:

When calling syslog.syslog() without calling syslog.openlog() before, openlog() 
gets called with no arguments. Documentation says: "The optional ident keyword 
argument is a string which is prepended to every message, and defaults to 
sys.argv[0] with leading
path components stripped." -- "35.13. syslog — Unix syslog library routines"

It leaves the final slash in, though. This produces syslog output for 
/usr/sbin/foo with identifier "/foo" instead of "foo". When reading syslog 
unprepared, one can easily think that to be a bug in the specific python script 
at hand (which it's not), or a chroot to be involved (which it's not, usually). 
So I consider this a bug.

On freenode/#python I was referred to 
https://github.com/python/cpython/blob/master/Modules/syslogmodule.c#L98 for 
the code that does this.

This issue is forwarded from a minor bug report reported by me at Debian: 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835577

A test script is attached, which, when called with absolute path, produces this 
in syslog:

  Aug 27 08:53:27 blackbox /test-syslog.py: Test from python!

The slash is misleading/wrong.

--
files: test-syslog.py
messages: 273770
nosy: canvon
priority: normal
severity: normal
status: open
title: Syslogs /usr/sbin/foo as /foo instead of as foo
type: behavior
Added file: https://bugs.python.org/file44240/test-syslog.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com