Print this page
1575 untangle libmlrpc ... pre2:
Get rid of ndr_rpc_server_{info,os}
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/smbsrv/libmlsvc/common/srvsvc_clnt.c
+++ new/usr/src/lib/smbsrv/libmlsvc/common/srvsvc_clnt.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
25 25 */
26 26
27 27 /*
28 28 * Server Service (srvsvc) client side RPC library interface. The
29 29 * srvsvc interface allows a client to query a server for information
30 30 * on shares, sessions, connections and files on the server. Some
31 31 * functions are available via anonymous IPC while others require
32 32 * administrator privilege. Also, some functions return NT status
33 33 * values while others return Win32 errors codes.
34 34 */
35 35
36 36 #include <sys/errno.h>
37 37 #include <sys/tzfile.h>
38 38 #include <stdio.h>
39 39 #include <time.h>
40 40 #include <strings.h>
41 41 #include <unistd.h>
42 42
43 43 #include <smbsrv/libsmb.h>
44 44 #include <smbsrv/libmlsvc.h>
45 45 #include <smbsrv/smbinfo.h>
46 46 #include <smbsrv/ndl/srvsvc.ndl>
47 47
48 48 /*
49 49 * Information level for NetShareGetInfo.
50 50 */
51 51 DWORD srvsvc_info_level = 1;
52 52
53 53 /*
54 54 * Bind to the the SRVSVC.
55 55 *
56 56 * If username argument is NULL, an anonymous connection will be established.
57 57 * Otherwise, an authenticated connection will be established.
58 58 */
59 59 static int
60 60 srvsvc_open(char *server, char *domain, char *username, mlsvc_handle_t *handle)
61 61 {
62 62 smb_domainex_t di;
63 63
64 64 if (server == NULL || domain == NULL) {
65 65 if (!smb_domain_getinfo(&di))
66 66 return (-1);
67 67
68 68 server = di.d_dci.dc_name;
69 69 domain = di.d_primary.di_nbname;
70 70 }
71 71
72 72 if (username == NULL)
73 73 username = MLSVC_ANON_USER;
74 74
75 75 if (ndr_rpc_bind(handle, server, domain, username, "SRVSVC") != 0)
76 76 return (-1);
77 77
78 78 return (0);
79 79 }
80 80
81 81 /*
82 82 * Unbind the SRVSVC connection.
83 83 */
84 84 static void
85 85 srvsvc_close(mlsvc_handle_t *handle)
86 86 {
87 87 ndr_rpc_unbind(handle);
88 88 }
89 89
90 90 /*
91 91 * This is a client side routine for NetShareGetInfo.
92 92 * Levels 0 and 1 work with an anonymous connection but
93 93 * level 2 requires administrator access.
94 94 */
95 95 int
96 96 srvsvc_net_share_get_info(char *server, char *domain, char *netname)
97 97 {
98 98 struct mlsm_NetShareGetInfo arg;
99 99 mlsvc_handle_t handle;
100 100 int rc;
101 101 int opnum;
102 102 struct mslm_NetShareInfo_0 *info0;
103 103 struct mslm_NetShareInfo_1 *info1;
104 104 struct mslm_NetShareInfo_2 *info2;
105 105 int len;
106 106 char user[SMB_USERNAME_MAXLEN];
107 107
108 108 if (netname == NULL)
109 109 return (-1);
110 110
111 111 if (srvsvc_info_level == 2)
112 112 smb_ipc_get_user(user, SMB_USERNAME_MAXLEN);
113 113
114 114 if (srvsvc_open(server, domain, user, &handle) != 0)
115 115 return (-1);
116 116
117 117 opnum = SRVSVC_OPNUM_NetShareGetInfo;
118 118 bzero(&arg, sizeof (struct mlsm_NetShareGetInfo));
119 119
120 120 len = strlen(server) + 4;
121 121 arg.servername = ndr_rpc_malloc(&handle, len);
122 122 if (arg.servername == NULL) {
123 123 srvsvc_close(&handle);
124 124 return (-1);
125 125 }
126 126
127 127 (void) snprintf((char *)arg.servername, len, "\\\\%s", server);
128 128 arg.netname = (LPTSTR)netname;
129 129 arg.level = srvsvc_info_level; /* share information level */
130 130
131 131 rc = ndr_rpc_call(&handle, opnum, &arg);
132 132 if ((rc != 0) || (arg.status != 0)) {
133 133 srvsvc_close(&handle);
134 134 return (-1);
135 135 }
136 136
137 137 switch (arg.result.switch_value) {
138 138 case 0:
139 139 info0 = arg.result.ru.info0;
140 140 smb_tracef("srvsvc shi0_netname=%s", info0->shi0_netname);
141 141 break;
142 142
143 143 case 1:
144 144 info1 = arg.result.ru.info1;
145 145 smb_tracef("srvsvc shi1_netname=%s", info1->shi1_netname);
146 146 smb_tracef("srvsvc shi1_type=%u", info1->shi1_type);
147 147
148 148 if (info1->shi1_comment)
149 149 smb_tracef("srvsvc shi1_comment=%s",
150 150 info1->shi1_comment);
151 151 break;
152 152
153 153 case 2:
154 154 info2 = arg.result.ru.info2;
155 155 smb_tracef("srvsvc shi2_netname=%s", info2->shi2_netname);
156 156 smb_tracef("srvsvc shi2_type=%u", info2->shi2_type);
157 157
158 158 if (info2->shi2_comment)
159 159 smb_tracef("srvsvc shi2_comment=%s",
160 160 info2->shi2_comment);
161 161
162 162 smb_tracef("srvsvc shi2_perms=%d", info2->shi2_permissions);
163 163 smb_tracef("srvsvc shi2_max_use=%d", info2->shi2_max_uses);
164 164 smb_tracef("srvsvc shi2_cur_use=%d", info2->shi2_current_uses);
165 165
166 166 if (info2->shi2_path)
167 167 smb_tracef("srvsvc shi2_path=%s", info2->shi2_path);
168 168
169 169 if (info2->shi2_passwd)
170 170 smb_tracef("srvsvc shi2_passwd=%s", info2->shi2_passwd);
171 171 break;
172 172
173 173 default:
174 174 smb_tracef("srvsvc: unknown level");
175 175 break;
176 176 }
177 177
178 178 srvsvc_close(&handle);
179 179 return (0);
180 180 }
181 181
182 182 /*
183 183 * This is a client side routine for NetSessionEnum.
184 184 * NetSessionEnum requires administrator rights.
185 185 */
186 186 int
187 187 srvsvc_net_session_enum(char *server, char *domain, char *netname)
188 188 {
189 189 struct mslm_NetSessionEnum arg;
190 190 mlsvc_handle_t handle;
191 191 int rc;
192 192 int opnum;
193 193 struct mslm_infonres infonres;
194 194 struct mslm_SESSION_INFO_1 *nsi1;
195 195 int len;
196 196 char user[SMB_USERNAME_MAXLEN];
197 197
198 198 if (netname == NULL)
199 199 return (-1);
200 200
201 201 smb_ipc_get_user(user, SMB_USERNAME_MAXLEN);
202 202
203 203 rc = srvsvc_open(server, domain, user, &handle);
204 204 if (rc != 0)
205 205 return (-1);
206 206
207 207 opnum = SRVSVC_OPNUM_NetSessionEnum;
208 208 bzero(&arg, sizeof (struct mslm_NetSessionEnum));
209 209
210 210 len = strlen(server) + 4;
211 211 arg.servername = ndr_rpc_malloc(&handle, len);
212 212 if (arg.servername == NULL) {
213 213 srvsvc_close(&handle);
214 214 return (-1);
215 215 }
216 216
217 217 (void) snprintf((char *)arg.servername, len, "\\\\%s", server);
218 218 infonres.entriesread = 0;
219 219 infonres.entries = 0;
220 220 arg.level = 1;
221 221 arg.result.level = 1;
222 222 arg.result.bufptr.p = &infonres;
223 223 arg.resume_handle = 0;
224 224 arg.pref_max_len = 0xFFFFFFFF;
225 225
226 226 rc = ndr_rpc_call(&handle, opnum, &arg);
227 227 if ((rc != 0) || (arg.status != 0)) {
228 228 srvsvc_close(&handle);
229 229 return (-1);
230 230 }
231 231
232 232 /* Only the first session info is dereferenced. */
233 233 nsi1 = ((struct mslm_infonres *)arg.result.bufptr.p)->entries;
234 234
235 235 smb_tracef("srvsvc switch_value=%d", arg.level);
236 236 smb_tracef("srvsvc sesi1_cname=%s", nsi1->sesi1_cname);
237 237 smb_tracef("srvsvc sesi1_uname=%s", nsi1->sesi1_uname);
238 238 smb_tracef("srvsvc sesi1_nopens=%u", nsi1->sesi1_nopens);
239 239 smb_tracef("srvsvc sesi1_time=%u", nsi1->sesi1_time);
240 240 smb_tracef("srvsvc sesi1_itime=%u", nsi1->sesi1_itime);
241 241 smb_tracef("srvsvc sesi1_uflags=%u", nsi1->sesi1_uflags);
242 242
243 243 srvsvc_close(&handle);
244 244 return (0);
245 245 }
246 246
247 247 /*
248 248 * This is a client side routine for NetConnectEnum.
249 249 * NetConnectEnum requires administrator rights.
250 250 * Level 0 and level 1 requests are supported.
251 251 */
252 252 int
253 253 srvsvc_net_connect_enum(char *server, char *domain, char *netname, int level)
254 254 {
255 255 struct mslm_NetConnectEnum arg;
256 256 mlsvc_handle_t handle;
257 257 int rc;
258 258 int opnum;
259 259 struct mslm_NetConnectInfo1 info1;
260 260 struct mslm_NetConnectInfo0 info0;
261 261 struct mslm_NetConnectInfoBuf1 *cib1;
262 262 int len;
263 263 char user[SMB_USERNAME_MAXLEN];
264 264
265 265 if (netname == NULL)
266 266 return (-1);
267 267
268 268 smb_ipc_get_user(user, SMB_USERNAME_MAXLEN);
269 269
270 270 rc = srvsvc_open(server, domain, user, &handle);
271 271 if (rc != 0)
272 272 return (-1);
273 273
274 274 opnum = SRVSVC_OPNUM_NetConnectEnum;
275 275 bzero(&arg, sizeof (struct mslm_NetConnectEnum));
276 276
277 277 len = strlen(server) + 4;
278 278 arg.servername = ndr_rpc_malloc(&handle, len);
279 279 if (arg.servername == NULL) {
280 280 srvsvc_close(&handle);
281 281 return (-1);
282 282 }
283 283
284 284 (void) snprintf((char *)arg.servername, len, "\\\\%s", server);
285 285 arg.qualifier = (LPTSTR)netname;
286 286
287 287 switch (level) {
288 288 case 0:
289 289 arg.info.level = 0;
290 290 arg.info.switch_value = 0;
291 291 arg.info.ru.info0 = &info0;
292 292 info0.entries_read = 0;
293 293 info0.ci0 = 0;
294 294 break;
295 295 case 1:
296 296 arg.info.level = 1;
297 297 arg.info.switch_value = 1;
298 298 arg.info.ru.info1 = &info1;
299 299 info1.entries_read = 0;
300 300 info1.ci1 = 0;
301 301 break;
302 302 default:
303 303 srvsvc_close(&handle);
304 304 return (-1);
305 305 }
306 306
307 307 arg.resume_handle = 0;
308 308 arg.pref_max_len = 0xFFFFFFFF;
309 309
310 310 rc = ndr_rpc_call(&handle, opnum, &arg);
311 311 if ((rc != 0) || (arg.status != 0)) {
312 312 srvsvc_close(&handle);
313 313 return (-1);
314 314 }
315 315
316 316 smb_tracef("srvsvc switch_value=%d", arg.info.switch_value);
317 317
318 318 switch (level) {
319 319 case 0:
320 320 if (arg.info.ru.info0 && arg.info.ru.info0->ci0) {
321 321 smb_tracef("srvsvc coni0_id=%x",
322 322 arg.info.ru.info0->ci0->coni0_id);
323 323 }
324 324 break;
325 325 case 1:
326 326 if (arg.info.ru.info1 && arg.info.ru.info1->ci1) {
327 327 cib1 = arg.info.ru.info1->ci1;
328 328
329 329 smb_tracef("srvsvc coni_uname=%s",
330 330 cib1->coni1_username ?
331 331 (char *)cib1->coni1_username : "(null)");
332 332 smb_tracef("srvsvc coni1_netname=%s",
333 333 cib1->coni1_netname ?
334 334 (char *)cib1->coni1_netname : "(null)");
335 335 smb_tracef("srvsvc coni1_nopens=%u",
336 336 cib1->coni1_num_opens);
337 337 smb_tracef("srvsvc coni1_time=%u", cib1->coni1_time);
338 338 smb_tracef("srvsvc coni1_num_users=%u",
339 339 cib1->coni1_num_users);
340 340 }
341 341 break;
342 342
↓ open down ↓ |
342 lines elided |
↑ open up ↑ |
343 343 default:
344 344 smb_tracef("srvsvc: unknown level");
345 345 break;
346 346 }
347 347
348 348 srvsvc_close(&handle);
349 349 return (0);
350 350 }
351 351
352 352 /*
353 - * Windows 95+ and Windows NT4.0 both report the version as 4.0.
354 - * Windows 2000+ reports the version as 5.x.
355 - */
356 -int
357 -srvsvc_net_server_getinfo(char *server, char *domain,
358 - srvsvc_server_info_t *svinfo)
359 -{
360 - mlsvc_handle_t handle;
361 - struct mslm_NetServerGetInfo arg;
362 - struct mslm_SERVER_INFO_101 *sv101;
363 - int len, opnum, rc;
364 - char user[SMB_USERNAME_MAXLEN];
365 -
366 - smb_ipc_get_user(user, SMB_USERNAME_MAXLEN);
367 -
368 - if (srvsvc_open(server, domain, user, &handle) != 0)
369 - return (-1);
370 -
371 - opnum = SRVSVC_OPNUM_NetServerGetInfo;
372 - bzero(&arg, sizeof (arg));
373 -
374 - len = strlen(server) + 4;
375 - arg.servername = ndr_rpc_malloc(&handle, len);
376 - if (arg.servername == NULL)
377 - return (-1);
378 -
379 - (void) snprintf((char *)arg.servername, len, "\\\\%s", server);
380 - arg.level = 101;
381 -
382 - rc = ndr_rpc_call(&handle, opnum, &arg);
383 - if ((rc != 0) || (arg.status != 0)) {
384 - srvsvc_close(&handle);
385 - return (-1);
386 - }
387 -
388 - sv101 = arg.result.bufptr.bufptr101;
389 -
390 - bzero(svinfo, sizeof (srvsvc_server_info_t));
391 - svinfo->sv_platform_id = sv101->sv101_platform_id;
392 - svinfo->sv_version_major = sv101->sv101_version_major;
393 - svinfo->sv_version_minor = sv101->sv101_version_minor;
394 - svinfo->sv_type = sv101->sv101_type;
395 - if (sv101->sv101_name)
396 - svinfo->sv_name = strdup((char *)sv101->sv101_name);
397 - if (sv101->sv101_comment)
398 - svinfo->sv_comment = strdup((char *)sv101->sv101_comment);
399 -
400 - if (svinfo->sv_type & SV_TYPE_WFW)
401 - svinfo->sv_os = NATIVE_OS_WIN95;
402 - if (svinfo->sv_type & SV_TYPE_WINDOWS)
403 - svinfo->sv_os = NATIVE_OS_WIN95;
404 - if ((svinfo->sv_type & SV_TYPE_NT) ||
405 - (svinfo->sv_type & SV_TYPE_SERVER_NT))
406 - svinfo->sv_os = NATIVE_OS_WINNT;
407 - if (svinfo->sv_version_major > 4)
408 - svinfo->sv_os = NATIVE_OS_WIN2000;
409 -
410 - srvsvc_close(&handle);
411 - return (0);
412 -}
413 -
414 -/*
415 353 * Compare the time here with the remote time on the server
416 354 * and report clock skew.
417 355 */
418 356 void
419 357 srvsvc_timecheck(char *server, char *domain)
420 358 {
421 359 char hostname[MAXHOSTNAMELEN];
422 360 struct timeval dc_tv;
423 361 struct tm dc_tm;
424 362 struct tm *tm;
425 363 time_t tnow;
426 364 time_t tdiff;
427 365 int priority;
428 366
429 367 if (srvsvc_net_remote_tod(server, domain, &dc_tv, &dc_tm) < 0) {
430 368 syslog(LOG_DEBUG, "srvsvc_net_remote_tod failed");
431 369 return;
432 370 }
433 371
434 372 tnow = time(NULL);
435 373
436 374 if (tnow > dc_tv.tv_sec)
437 375 tdiff = (tnow - dc_tv.tv_sec) / SECSPERMIN;
438 376 else
439 377 tdiff = (dc_tv.tv_sec - tnow) / SECSPERMIN;
440 378
441 379 if (tdiff != 0) {
442 380 (void) strlcpy(hostname, "localhost", MAXHOSTNAMELEN);
443 381 (void) gethostname(hostname, MAXHOSTNAMELEN);
444 382
445 383 priority = (tdiff > 2) ? LOG_NOTICE : LOG_DEBUG;
446 384 syslog(priority, "DC [%s] clock skew detected: %u minutes",
447 385 server, tdiff);
448 386
449 387 tm = gmtime(&dc_tv.tv_sec);
450 388 syslog(priority, "%-8s UTC: %s", server, asctime(tm));
451 389 tm = gmtime(&tnow);
452 390 syslog(priority, "%-8s UTC: %s", hostname, asctime(tm));
453 391 }
454 392 }
455 393
456 394 /*
457 395 * Synchronize the local system clock with the domain controller.
458 396 */
459 397 void
460 398 srvsvc_timesync(void)
461 399 {
462 400 smb_domainex_t di;
463 401 struct timeval tv;
464 402 struct tm tm;
465 403 time_t tsecs;
466 404
467 405 if (!smb_domain_getinfo(&di))
468 406 return;
469 407
470 408 if (srvsvc_net_remote_tod(di.d_dci.dc_name, di.d_primary.di_nbname,
471 409 &tv, &tm) != 0)
472 410 return;
473 411
474 412 if (settimeofday(&tv, 0))
475 413 smb_tracef("unable to set system time");
476 414
477 415 tsecs = time(0);
478 416 (void) localtime_r(&tsecs, &tm);
479 417 smb_tracef("SrvsvcTimeSync %s", ctime((time_t *)&tv.tv_sec));
480 418 }
481 419
482 420 /*
483 421 * NetRemoteTOD to get the current GMT time from a Windows NT server.
484 422 */
485 423 int
486 424 srvsvc_gettime(unsigned long *t)
487 425 {
488 426 smb_domainex_t di;
489 427 struct timeval tv;
490 428 struct tm tm;
491 429
492 430 if (!smb_domain_getinfo(&di))
493 431 return (-1);
494 432
495 433 if (srvsvc_net_remote_tod(di.d_dci.dc_name, di.d_primary.di_nbname,
496 434 &tv, &tm) != 0)
497 435 return (-1);
498 436
499 437 *t = tv.tv_sec;
500 438 return (0);
501 439 }
502 440
503 441 /*
504 442 * This is a client side routine for NetRemoteTOD, which gets the time
505 443 * and date from a remote system. The time information is returned in
506 444 * the timeval and tm.
507 445 *
508 446 * typedef struct _TIME_OF_DAY_INFO {
509 447 * DWORD tod_elapsedt; // seconds since 00:00:00 January 1 1970 GMT
510 448 * DWORD tod_msecs; // arbitrary milliseconds (since reset)
511 449 * DWORD tod_hours; // current hour [0-23]
512 450 * DWORD tod_mins; // current minute [0-59]
513 451 * DWORD tod_secs; // current second [0-59]
514 452 * DWORD tod_hunds; // current hundredth (0.01) second [0-99]
515 453 * LONG tod_timezone; // time zone of the server
516 454 * DWORD tod_tinterval; // clock tick time interval
517 455 * DWORD tod_day; // day of the month [1-31]
518 456 * DWORD tod_month; // month of the year [1-12]
519 457 * DWORD tod_year; // current year
520 458 * DWORD tod_weekday; // day of the week since sunday [0-6]
521 459 * } TIME_OF_DAY_INFO;
522 460 *
523 461 * The time zone of the server is calculated in minutes from Greenwich
524 462 * Mean Time (GMT). For time zones west of Greenwich, the value is
525 463 * positive; for time zones east of Greenwich, the value is negative.
526 464 * A value of -1 indicates that the time zone is undefined.
527 465 *
528 466 * The clock tick value represents a resolution of one ten-thousandth
529 467 * (0.0001) second.
530 468 */
531 469 int
532 470 srvsvc_net_remote_tod(char *server, char *domain, struct timeval *tv,
533 471 struct tm *tm)
534 472 {
535 473 struct mslm_NetRemoteTOD arg;
536 474 struct mslm_TIME_OF_DAY_INFO *tod;
537 475 mlsvc_handle_t handle;
538 476 int rc;
539 477 int opnum;
540 478 int len;
541 479 char user[SMB_USERNAME_MAXLEN];
542 480
543 481 smb_ipc_get_user(user, SMB_USERNAME_MAXLEN);
544 482
545 483 rc = srvsvc_open(server, domain, user, &handle);
546 484 if (rc != 0)
547 485 return (-1);
548 486
549 487 opnum = SRVSVC_OPNUM_NetRemoteTOD;
550 488 bzero(&arg, sizeof (struct mslm_NetRemoteTOD));
551 489
552 490 len = strlen(server) + 4;
553 491 arg.servername = ndr_rpc_malloc(&handle, len);
554 492 if (arg.servername == NULL) {
555 493 srvsvc_close(&handle);
556 494 return (-1);
557 495 }
558 496
559 497 (void) snprintf((char *)arg.servername, len, "\\\\%s", server);
560 498
561 499 rc = ndr_rpc_call(&handle, opnum, &arg);
562 500 if ((rc != 0) || (arg.status != 0)) {
563 501 srvsvc_close(&handle);
564 502 return (-1);
565 503 }
566 504
567 505 /*
568 506 * We're assigning milliseconds to microseconds
569 507 * here but the value's not really relevant.
570 508 */
571 509 tod = arg.bufptr;
572 510
573 511 if (tv) {
574 512 tv->tv_sec = tod->tod_elapsedt;
575 513 tv->tv_usec = tod->tod_msecs;
576 514 }
577 515
578 516 if (tm) {
579 517 tm->tm_sec = tod->tod_secs;
↓ open down ↓ |
155 lines elided |
↑ open up ↑ |
580 518 tm->tm_min = tod->tod_mins;
581 519 tm->tm_hour = tod->tod_hours;
582 520 tm->tm_mday = tod->tod_day;
583 521 tm->tm_mon = tod->tod_month - 1;
584 522 tm->tm_year = tod->tod_year - 1900;
585 523 tm->tm_wday = tod->tod_weekday;
586 524 }
587 525
588 526 srvsvc_close(&handle);
589 527 return (0);
590 -}
591 -
592 -void
593 -srvsvc_net_test(char *server, char *domain, char *netname)
594 -{
595 - smb_domainex_t di;
596 - srvsvc_server_info_t svinfo;
597 -
598 - (void) smb_tracef("%s %s %s", server, domain, netname);
599 -
600 - if (smb_domain_getinfo(&di)) {
601 - server = di.d_dci.dc_name;
602 - domain = di.d_primary.di_nbname;
603 - }
604 -
605 - if (srvsvc_net_server_getinfo(server, domain, &svinfo) == 0) {
606 - smb_tracef("NetServerGetInfo: %s %s (%d.%d) id=%d type=0x%08x",
607 - svinfo.sv_name ? svinfo.sv_name : "NULL",
608 - svinfo.sv_comment ? svinfo.sv_comment : "NULL",
609 - svinfo.sv_version_major, svinfo.sv_version_minor,
610 - svinfo.sv_platform_id, svinfo.sv_type);
611 -
612 - free(svinfo.sv_name);
613 - free(svinfo.sv_comment);
614 - }
615 -
616 - (void) srvsvc_net_share_get_info(server, domain, netname);
617 -#if 0
618 - /*
619 - * The NetSessionEnum server-side definition was updated.
620 - * Disabled until the client-side has been updated.
621 - */
622 - (void) srvsvc_net_session_enum(server, domain, netname);
623 -#endif
624 - (void) srvsvc_net_connect_enum(server, domain, netname, 0);
625 - (void) srvsvc_net_connect_enum(server, domain, netname, 1);
626 528 }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX