--- libsmb/libsmbclient.c.old 2005-01-23 11:05:14.760037768 +0000 +++ libsmb/libsmbclient.c 2005-01-23 11:08:02.257574272 +0000 @@ -4418,6 +4418,7 @@ pstring conf; int pid; char *user = NULL, *home = NULL; + char *hostname; if (!context || !context->internal) { errno = EBADF; @@ -4504,13 +4505,13 @@ /* * Hmmm, I want to get hostname as well, but I am too lazy for the moment */ - pid = sys_getpid(); - context->netbios_name = SMB_MALLOC(17); + gethostname(hostname,255); + context->netbios_name = SMB_MALLOC(17); if (!context->netbios_name) { errno = ENOMEM; return NULL; } - slprintf(context->netbios_name, 16, "smbc%s%d", context->user, pid); + slprintf(context->netbios_name, 16, "smbc%s%s", context->user, hostname); } }