svn commit: samba r9301 - branches/SAMBA_3_0/source/nsswitch
trunk/source/nsswitch
jpeach at samba.org
jpeach at samba.org
Sat Aug 13 08:49:50 GMT 2005
Author: jpeach
Date: 2005-08-13 08:49:50 +0000 (Sat, 13 Aug 2005)
New Revision: 9301
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9301
Log:
Allow user-defined list and lookup timeouts on IRIX. Bugzilla bug #2284.
Modified:
branches/SAMBA_3_0/source/nsswitch/winbind_nss_irix.c
trunk/source/nsswitch/winbind_nss_irix.c
Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbind_nss_irix.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbind_nss_irix.c 2005-08-13 03:17:18 UTC (rev 9300)
+++ branches/SAMBA_3_0/source/nsswitch/winbind_nss_irix.c 2005-08-13 08:49:50 UTC (rev 9301)
@@ -332,7 +332,22 @@
NSS_STATUS status;
long timeout;
- timeout = 1000;
+ switch (rq->f_index) {
+ case LOOKUP:
+ timeout = nsd_attr_fetch_long(rq->f_attrs,
+ "lookup_timeout", 10, 10 * 1000);
+ break;
+ case LIST:
+ timeout = nsd_attr_fetch_long(rq->f_attrs,
+ "list_timeout", 10, 10 * 1000);
+ break;
+ default:
+ nsd_logprintf(NSD_LOG_OPER,
+ "send_next_request (winbind) "
+ "invalid request type %d\n", rq->f_index);
+ rq->f_status = NS_BADREQ;
+ return NSD_NEXT;
+ }
nsd_logprintf(NSD_LOG_MIN, "send_next_request (winbind) %d to = %d\n",
rq->f_cmd_data, timeout);
Modified: trunk/source/nsswitch/winbind_nss_irix.c
===================================================================
--- trunk/source/nsswitch/winbind_nss_irix.c 2005-08-13 03:17:18 UTC (rev 9300)
+++ trunk/source/nsswitch/winbind_nss_irix.c 2005-08-13 08:49:50 UTC (rev 9301)
@@ -332,7 +332,22 @@
NSS_STATUS status;
long timeout;
- timeout = 1000;
+ switch (rq->f_index) {
+ case LOOKUP:
+ timeout = nsd_attr_fetch_long(rq->f_attrs,
+ "lookup_timeout", 10, 10 * 1000);
+ break;
+ case LIST:
+ timeout = nsd_attr_fetch_long(rq->f_attrs,
+ "list_timeout", 10, 10 * 1000);
+ break;
+ default:
+ nsd_logprintf(NSD_LOG_OPER,
+ "send_next_request (winbind) "
+ "invalid request type %d\n", rq->f_index);
+ rq->f_status = NS_BADREQ;
+ return NSD_NEXT;
+ }
nsd_logprintf(NSD_LOG_MIN, "send_next_request (winbind) %d to = %d\n",
rq->f_cmd_data, timeout);
More information about the samba-cvs
mailing list