UID and TID, samba regresison
jeanmichel.123 at free.fr
jeanmichel.123 at free.fr
Thu Jun 23 14:53:55 GMT 2005
On both
smbclient Version 3.0.14a-Debian and Version 2.0.8
an error appear when printing.
This error does not happend with samba-1.9.18p8 or windows 2k (2000).
The error is:
ERRSRV - ERRaccess (The requester does not have the necessary access rights
within the specified context for the requested function. The context is
defined by the TID or the UID.) opening remote file stdin-30195
It looks like uid is set to 0 by Version 3.0.14a-Debian, when it is set to unix
uid, by samba-1.9.18p8.
This happend in a workgroup environment (withuot domain).
The printserver is a "NetportExpress(tm) PRO/100 single port", on which no
username is needed to connect on.
According to ethereal, the uid is yet differing at the "negociate protocol
request step".
Due to this error, printing is not possible.
The regression is in:
http://cvs.samba.org/cgi-bin/cvsweb/samba/source/libsmb/clientgen.c.diff?r1=1.40&r2=1.41&f=h
::::::::::::: version 1.9: (set uid to getuid())
::::::::::::: revision 1.1 to 1.40
/****************************************************************************
initialise a client structure
****************************************************************************/
BOOL cli_initialise(struct cli_state *cli)
{
if (cli->initialised) cli_shutdown(cli);
memset(cli, 0, sizeof(*cli));
cli->fd = -1;
cli->cnum = -1;
cli->pid = getpid();
cli->mid = 1;
cli->uid = getuid();
cli->protocol = PROTOCOL_NT1;
....
::::::::::::: version 3.0.14a: (set vuid to 0)
::::::::::::: revision 1.159 to 1.230
::::::::::::: revision 1.41 to 1.158
/****************************************************************************
Initialise a client structure.
****************************************************************************/
struct cli_state *cli_initialise(struct cli_state *cli)
{
BOOL alloced_cli = False;
int i;
/* Check the effective uid - make sure we are not setuid */
if (is_setuid_root()) {
DEBUG(0,("libsmb based programs must *NOT* be setuid root.\n"));
return NULL;
}
.......
if (cli->initialised)
cli_close_connection(cli);
ZERO_STRUCTP(cli);
cli->port = 0;
cli->fd = -1;
cli->cnum = -1;
cli->pid = (uint16)sys_getpid();
cli->mid = 1;
cli->vuid = UID_FIELD_INVALID;
More information about the smb-clients
mailing list