The Samba-Bugzilla – Attachment 327 Details for
Bug 700
spurious authentications when enumerating servers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test program
smbtest.c (text/plain), 979 bytes, created by
Bastien Nocera
on 2003-12-16 11:13:51 UTC
(
hide
)
Description:
test program
Filename:
MIME Type:
Creator:
Bastien Nocera
Created:
2003-12-16 11:13:51 UTC
Size:
979 bytes
patch
obsolete
> >// gcc -Wall -o smbtest smbtest.c -lsmbclient > >#define _GNU_SOURCE >#include <stdlib.h> >#include <libsmbclient.h> >#include <string.h> >#include <stdio.h> > > >static void >auth_fn(const char *server, const char *share, > char *workgroup, int wgmaxlen, char *username, int unmaxlen, > char *password, int pwmaxlen) >{ > printf ("auth_fn called:\n" > "server: %s\n" > "share: %s\n" > "wgroup: %s\n\n", > server, share, workgroup); >} > > >int main (int argc, char **argv) >{ > struct smbc_dirent *entry; > int err, fd; > > err = smbc_init (auth_fn, 10); > if (err < 0) { > char *str; > > str = strerror (err); > printf ("smbc_init: %s\n", str); > free (str); > return 1; > } > > fd = smbc_opendir ("smb://"); > if (fd < 0) { > perror ("smbc_opendir"); > return 1; > } > > entry = smbc_readdir (fd); > while (entry != NULL) { > char *name; > > name = strndup (entry->name, entry->namelen); > printf ("read %s\n", name); > free (name); > > entry = smbc_readdir (fd); > } > > smbc_closedir (fd); > > return 0; >} >
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 700
: 327 |
328