[PATCH] Use setproctitle in winbindd

Andrew Bartlett abartlet at samba.org
Tue Jan 9 20:52:40 UTC 2018


On Tue, 2018-01-09 at 20:54 +0100, Ralph Böhme wrote:
> On Wed, Jan 10, 2018 at 08:10:17AM +1300, Andrew Bartlett via samba-technical wrote:
> > 
> > I agree.  A pattern where we set the prctl(PR_SET_NAME) with a
> > truncated name and the setproctitle with a longer one would be a very
> > good idea, ideally as a function that calls both, eg
> > set_samba_process_titles(short, long). 
> 
> what for? Why calling prctl? My understanding was calling setproctitle is all
> that's needed for fancy ps output across the board. Isn't that what the samba
> binary calls as well?

They are different tags.  The setproctitle thing is via libbsd and is
frankly a totally disgusting hack.  However, it is broadly used enough
that I assume it will keep working. 

This describes a little of the approaches:
 https://tycho.ws/blog/2015/02/setproctitle.html

However note that it looks like libbsd doesn't use the
ptrctl(PR_SET_MM) et al. 

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba







More information about the samba-technical mailing list