svn commit: samba r14079 - in branches/SAMBA_4_0/source:
cldap_server kdc ldap_server nbt_server smb_server smbd web_server winbind
t.d.lee at durham.ac.uk
Fri Mar 10 17:30:29 GMT 2006
> On Thu, 2006-03-09 at 17:48 +0000, metze at samba.org wrote:
>> I just found the setproctitle library from alt linux:-)
>> - add set_title hook to the process models
>> - use setproctitle library in process_model standard if available
>> - the the title for the task servers and on connections
> This is a very not portable thing, and in my opinion also dangerous,
> IIRC it plays with a portion of memory you are not supposed to touch on
> Linux. If I remember it correctly some BSD has a reliable system call to
> do that, but in any case I do not see any advantage in being not
> consistent across platforms.
Just a quick "me, too" caution about "setproctitle" from someone now out
of samba development (but who contributed "utmp", "inherit permissions"
etc. in days gone by, and who has always been mightily impressed by
Samba's portability and quality control).
The "heartbeat" (Linux HA) project (www.linux-ha.org) also imported some
implementation of "setproctitle" code. In making "heartbeat" portable, I
started get strange runtime errors on Solaris-9 which I eventually tracked
down to the particular implementation of "setproctitle" that they had
earlier imported. (Solaris-8 was fine.) The internals of this code looked
rather alarming and (to my untutored eye) seemed probably to be making
assumptions about the layout and relative positions in memory of "argv"
and "envp". (These might have been fine of Linux, but were probably an
accident waiting to happen on other platforms.) We (Linux HA) now ensure
that this code is disabled by default (enabled only on Linux and other
platforms where tests can be performed).
So take care if importing a "setproctitle" to samba.
P.S. to Jerry: look forward to seeing you here in Durham in a few days!
: David Lee I.T. Service :
: Senior Systems Programmer Computer Centre :
: Durham University :
: http://www.dur.ac.uk/t.d.lee/ South Road :
: Durham DH1 3LE :
: Phone: +44 191 334 2752 U.K. :
More information about the samba-technical