[PATCH] vfs_glusterfs: Enable per client log file

Andrew Bartlett abartlet at samba.org
Wed Oct 23 15:39:20 MDT 2013

(resend, with modifications, because I didn't see this make it to the
On Mon, 2013-10-21 at 16:06 -0500, Christopher R. Hertel wrote:
> Andreas,
> As Poornima pointed out to me, current_user_info.domain is accessed directly
> in a few places in Samba.  Printing and messaging, in particular.  If we
> were to remove 'extern userdom_struct current_user_info;' and use
> 'get_current_username()', as you suggest, we would need to update a few (not
> too many) other files as well.
> I agree that it should be done, and Poornima has identified the right place
> to to add the function, but I would like to separate out that fix from the
> others.

The issue is that we should, particularly in new code, use the username
off the session_info, rather than off these global variable. 

> Poornima's patch is about splitting up log files generated by the
> vfs_glusterfs module.  Your suggestion is about a broader (though quite
> simple) cleanup in Samba.  Once we have Poornima's patch accepted and
> applied, I'll follow up with the cleanup you've suggested.

This would be the first use of this global variable in a VFS module.  I
think we should do that properly before we set up a pattern here,
because such patterns are self-perpetuating. 

I also think it is the wrong pattern, the correct pattern is to use
handle->conn->session_info, not global variables.

To enable this, there should be a new substitution routine that takes a session_info.

> Andrew Bartlett:  Yes, the marshalling fixes you requested a while back are
> still on my radar.

Thanks, I would like to see that fixed up, given that patch was merged
on the basis that a follow-up would appear shortly.  In the same way
that I argued before, we should do this right first, not try to fix it
up later.

Andrew Bartlett

Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org

Andrew Bartlett
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Catalyst IT                   http://catalyst.net.nz

More information about the samba-technical mailing list