question regarding lprm/session_tag

Andrew Park apark at cdf.toronto.edu
Wed Jan 26 16:42:24 GMT 2000


Hi

We have a samba server (2.0.5a) that serves about 100 NT stations.  It is our
master browser, domain controller, file server, and print server.  All are
fine and dandy, but when trying to delete print jobs it runs into trouble.
I've been looking at the source code and observing the behaviour of samba
process and found out that when executing lprm the UID changes to nobody.
This is not good since print jobs are submitted as authenticated user.  From
what I can tell it opens the connection to the printer as nobody.  Only place
I can find possible UID switch is in process.c 

	if (session_tag != last_session_tag) {
          user_struct *vuser = NULL;
 
          last_session_tag = session_tag;
          if(session_tag != UID_FIELD_INVALID)
            vuser = get_valid_user_struct(session_tag);
 
          if(vuser != NULL)
            pstrcpy( sesssetup_user, vuser->requested_name);
	}

or further down the code

	if ((flags & AS_USER) && !become_user(conn,session_tag)) {
          if (flags & AS_GUEST)
            flags &= ~AS_USER;
          else
            return(ERROR(ERRSRV,ERRinvnid));
        }

I see the first case more likely.  But I'm having trouble understanding
the concept behind session_tag, since each client gets assigned its own copy
of smbd process.  Could anyone help or explain?
Thanks



Andrew Park
           
___________________________________________________________________________ 
CDFlab Systems Administrator                           www.cdf.utoronto.ca|
---------------------------------------------------------------------------




More information about the samba-technical mailing list