The Samba-Bugzilla – Attachment 345 Details for
Bug 935
[patch] support nsswitch "wins" resolution on solaris
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to nsswitch/wins.c to support Solaris
wins_sol.patch (text/plain), 2.48 KB, created by
Steven Tamm
on 2004-01-02 13:10:07 UTC
(
hide
)
Description:
Patch to nsswitch/wins.c to support Solaris
Filename:
MIME Type:
Creator:
Steven Tamm
Created:
2004-01-02 13:10:07 UTC
Size:
2.48 KB
patch
obsolete
>*** nsswitch/wins.c.old Sun Dec 14 19:36:25 2003 >--- nsswitch/wins.c Fri Jan 2 12:12:11 2004 >*************** >*** 376,379 **** >--- 376,476 ---- > return _nss_wins_gethostbyname_r( > name, he, buffer, buflen, h_errnop); > } >+ >+ #if SUNOS5 >+ >+ #define NSS_ARGS(args) ((nss_XbyY_args_t *)args) >+ >+ static NSS_STATUS >+ _nss_wins_gethostbyname_solwrap(nss_backend_t* be, void* args) >+ { >+ NSS_STATUS ret; >+ struct hostent* result = (struct hostent*) NSS_ARGS(args)->buf.result; >+ >+ ret = _nss_wins_gethostbyname_r (NSS_ARGS(args)->key.name, >+ result, >+ NSS_ARGS(args)->buf.buffer, >+ NSS_ARGS(args)->buf.buflen, >+ &NSS_ARGS(args)->erange); >+ >+ if(ret == NSS_STATUS_SUCCESS) >+ NSS_ARGS(args)->returnval = (void*) result; >+ >+ result->h_aliases = (char**)malloc(sizeof(char*)); >+ result->h_aliases[0] = NULL; >+ return ret; >+ } >+ >+ static NSS_STATUS >+ _nss_wins_gethostbyaddr_r(const char *addr, int length, int type, >+ struct hostent *result, char *buffer, int buflen, >+ int *h_errnop) >+ { >+ return NSS_STATUS_NOTFOUND; >+ } >+ >+ static NSS_STATUS >+ _nss_wins_gethostbyaddr_solwrap(nss_backend_t* be, void* args) >+ { >+ NSS_STATUS ret; >+ struct hostent* result = (struct hostent*) NSS_ARGS(args)->buf.result; >+ >+ ret = _nss_wins_gethostbyaddr_r (NSS_ARGS(args)->key.hostaddr.addr, >+ NSS_ARGS(args)->key.hostaddr.len, >+ NSS_ARGS(args)->key.hostaddr.type, >+ result, >+ NSS_ARGS(args)->buf.buffer, >+ NSS_ARGS(args)->buf.buflen, >+ &NSS_ARGS(args)->erange >+ ); >+ >+ if(ret == NSS_STATUS_SUCCESS) >+ NSS_ARGS(args)->returnval = (void*) result; >+ >+ return ret; >+ } >+ >+ static NSS_STATUS >+ _nss_wins_hosts_destr (nss_backend_t* be, void* args) >+ { >+ SAFE_FREE(be); >+ return NSS_STATUS_SUCCESS; >+ } >+ >+ static nss_backend_op_t hosts_ops[] = >+ { >+ _nss_wins_hosts_destr, >+ NULL, >+ NULL, >+ NULL, >+ _nss_wins_gethostbyname_solwrap, >+ _nss_wins_gethostbyaddr_solwrap >+ }; >+ >+ nss_backend_t* >+ _nss_wins_hosts_constr (const char* db_name, >+ const char* src_name, >+ const char* cfg_args) >+ { >+ nss_backend_t* be; >+ >+ if(!(be = (nss_backend_t*) malloc(sizeof(nss_backend_t))) ) >+ return NULL; >+ >+ be->ops = hosts_ops; >+ be->n_ops = sizeof(hosts_ops) / sizeof(nss_backend_op_t); >+ >+ return be; >+ } >+ >+ nss_backend_t* >+ _nss_wins_ipnodes_constr (const char *db_name, >+ const char *src_name, >+ const char *cfg_args) >+ { >+ return _nss_wins_hosts_constr(db_name, src_name, cfg_args); >+ } >+ >+ #endif >+ > #endif
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 935
: 345