The Samba-Bugzilla – Attachment 909 Details for
Bug 2275
libsmbclient generates unique netbios name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
replaces PID with hostname
diff (text/plain), 1.09 KB, created by
Joel
on 2005-01-23 04:27:08 UTC
(
hide
)
Description:
replaces PID with hostname
Filename:
MIME Type:
Creator:
Joel
Created:
2005-01-23 04:27:08 UTC
Size:
1.09 KB
patch
obsolete
>--- 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); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2275
: 909