[packages] fix large file support in samba3 (closes: #4014)
[openwrt/svn-archive/archive.git] / net / samba3 / patches / 100-avm.patch
1 diff -urN samba-3.0.24.orig/source/auth/auth_compat.c samba-3.0.24/source/auth/auth_compat.c
2 --- samba-3.0.24.orig/source/auth/auth_compat.c 2006-04-20 04:29:20.000000000 +0200
3 +++ samba-3.0.24/source/auth/auth_compat.c 2007-07-17 13:19:05.000000000 +0200
4 @@ -92,18 +92,25 @@
5 check if a username/password pair is ok via the auth subsystem.
6 return True if the password is correct, False otherwise
7 ****************************************************************************/
8 +
9 BOOL password_ok(char *smb_name, DATA_BLOB password_blob)
10 {
11 +
12 + DATA_BLOB null_password = data_blob(NULL, 0);
13 + BOOL encrypted = (global_encrypted_passwords_negotiated && (password_blob.length == 24 || password_blob.length > 46));
14 +
15 + if (encrypted) {
16 + /*
17 + * The password could be either NTLM or plain LM. Try NTLM first,
18 + * but fall-through as required.
19 + * Vista sends NTLMv2 here - we need to try the client given workgroup.
20 + */
21 + if (get_session_workgroup()) {
22 + if (NT_STATUS_IS_OK(pass_check_smb(smb_name, get_session_workgroup(), null_password, password_blob, null_password, encrypted))) {
23 + return True;
24 + }
25 + }
26
27 - DATA_BLOB null_password = data_blob(NULL, 0);
28 - BOOL encrypted = (global_encrypted_passwords_negotiated && password_blob.length == 24);
29 -
30 - if (encrypted) {
31 - /*
32 - * The password could be either NTLM or plain LM. Try NTLM first,
33 - * but fall-through as required.
34 - * NTLMv2 makes no sense here.
35 - */
36 if (NT_STATUS_IS_OK(pass_check_smb(smb_name, lp_workgroup(), null_password, password_blob, null_password, encrypted))) {
37 return True;
38 }
39 @@ -119,5 +126,3 @@
40
41 return False;
42 }
43 -
44 -
45 diff -urN samba-3.0.24.orig/source/auth/auth_util.c samba-3.0.24/source/auth/auth_util.c
46 --- samba-3.0.24.orig/source/auth/auth_util.c 2007-02-04 19:59:14.000000000 +0100
47 +++ samba-3.0.24/source/auth/auth_util.c 2007-07-17 13:19:05.000000000 +0200
48 @@ -2043,18 +2043,20 @@
49 /* The only other possible result is that winbind is not up
50 and running. We need to update the trustdom_cache
51 ourselves */
52 -
53 +#ifndef AVM_SMALLER
54 update_trustdom_cache();
55 +#endif
56 }
57
58 /* now the trustdom cache should be available a DC could still
59 * have a transitive trust so fall back to the cache of trusted
60 * domains (like a domain member would use */
61
62 +#ifndef AVM_SMALLER
63 if ( trustdom_cache_fetch(dom_name, &trustdom_sid) ) {
64 return True;
65 }
66 -
67 +#endif
68 return False;
69 }
70
71
72 diff -urN samba-3.0.24.orig/source/bin/dummy samba-3.0.24/source/bin/dummy
73 --- samba-3.0.24.orig/source/bin/dummy 1970-01-01 01:00:00.000000000 +0100
74 +++ samba-3.0.24/source/bin/dummy 2007-07-17 13:19:05.000000000 +0200
75 @@ -0,0 +1 @@
76 +x
77 diff -urN samba-3.0.24.orig/source/.dmallocrc samba-3.0.24/source/.dmallocrc
78 --- samba-3.0.24.orig/source/.dmallocrc 2005-02-25 18:59:36.000000000 +0100
79 +++ samba-3.0.24/source/.dmallocrc 1970-01-01 01:00:00.000000000 +0100
80 @@ -1,2 +0,0 @@
81 -samba allow-free-null, log-stats, log-non-free, log-trans, \
82 - check-fence, check-heap, check-lists, error-abort
83 \ No newline at end of file
84 diff -urN samba-3.0.24.orig/source/include/config.h samba-3.0.24/source/include/config.h
85 --- samba-3.0.24.orig/source/include/config.h 1970-01-01 01:00:00.000000000 +0100
86 +++ samba-3.0.24/source/include/config.h 2008-01-28 10:18:38.000000000 +0100
87 @@ -0,0 +1,2229 @@
88 +/* include/config.h. Generated by configure. */
89 +/* include/config.h.in. Generated from configure.in by autoheader. */
90 +
91 +/* Whether the host os is aix */
92 +/* #undef AIX */
93 +
94 +/* Whether the AIX send_file() API is available */
95 +/* #undef AIX_SENDFILE_API */
96 +
97 +/* Does extattr API work */
98 +/* #undef BROKEN_EXTATTR */
99 +
100 +/* Does getgrnam work correctly */
101 +/* #undef BROKEN_GETGRNAM */
102 +
103 +/* Whether the nisplus include files are broken */
104 +#define BROKEN_NISPLUS_INCLUDE_FILES 1
105 +
106 +/* Broken RedHat 7.2 system header files */
107 +/* #undef BROKEN_REDHAT_7_SYSTEM_HEADERS */
108 +
109 +/* Does strndup work correctly */
110 +/* #undef BROKEN_STRNDUP */
111 +
112 +/* Does strnlen work correctly */
113 +/* #undef BROKEN_STRNLEN */
114 +
115 +/* Does this system use unicode compose characters */
116 +/* #undef BROKEN_UNICODE_COMPOSE_CHARACTERS */
117 +
118 +/* Whether the compiler supports the LL prefix on long long integers */
119 +#define COMPILER_SUPPORTS_LL 1
120 +
121 +/* Whether the host os is Darwin/MacOSX */
122 +/* #undef DARWINOS */
123 +
124 +/* Default display charset name */
125 +#define DEFAULT_DISPLAY_CHARSET "ASCII"
126 +
127 +/* Default dos charset name */
128 +#define DEFAULT_DOS_CHARSET "CP850"
129 +
130 +/* Default unix charset name */
131 +#define DEFAULT_UNIX_CHARSET "UTF-8"
132 +
133 +/* Define to check invariants around some common functions */
134 +/* #undef DMALLOC_FUNC_CHECK */
135 +
136 +/* Define to turn on dmalloc debugging */
137 +/* #undef ENABLE_DMALLOC */
138 +
139 +/* Whether the host os is FreeBSD */
140 +/* #undef FREEBSD */
141 +
142 +/* Whether the FreeBSD sendfile() API is available */
143 +/* #undef FREEBSD_SENDFILE_API */
144 +
145 +/* Whether we are running on 64bit linux */
146 +/* #undef HAVE_64BIT_LINUX */
147 +
148 +/* Whether acl_get_perm_np() is available */
149 +/* #undef HAVE_ACL_GET_PERM_NP */
150 +
151 +/* Whether the krb5_address struct has a addrtype property */
152 +/* #undef HAVE_ADDRTYPE_IN_KRB5_ADDRESS */
153 +
154 +/* Whether the krb5_address struct has a addr_type property */
155 +/* #undef HAVE_ADDR_TYPE_IN_KRB5_ADDRESS */
156 +
157 +/* Define to 1 if you have the <afs/afs.h> header file. */
158 +/* #undef HAVE_AFS_AFS_H */
159 +
160 +/* Define to 1 if you have the <afs.h> header file. */
161 +/* #undef HAVE_AFS_H */
162 +
163 +/* Whether 64 bit aio is available */
164 +/* #undef HAVE_AIOCB64 */
165 +
166 +/* Have aio_cancel */
167 +/* #undef HAVE_AIO_CANCEL */
168 +
169 +/* Have aio_cancel64 */
170 +/* #undef HAVE_AIO_CANCEL64 */
171 +
172 +/* Have aio_error */
173 +/* #undef HAVE_AIO_ERROR */
174 +
175 +/* Have aio_error64 */
176 +/* #undef HAVE_AIO_ERROR64 */
177 +
178 +/* Have aio_fsync */
179 +/* #undef HAVE_AIO_FSYNC */
180 +
181 +/* Have aio_fsync64 */
182 +/* #undef HAVE_AIO_FSYNC64 */
183 +
184 +/* Define to 1 if you have the <aio.h> header file. */
185 +/* AR7 #define HAVE_AIO_H 1 */
186 +
187 +/* Have aio_read */
188 +/* #undef HAVE_AIO_READ */
189 +
190 +/* Have aio_read64 */
191 +/* #undef HAVE_AIO_READ64 */
192 +
193 +/* Have aio_return */
194 +/* #undef HAVE_AIO_RETURN */
195 +
196 +/* Have aio_return64 */
197 +/* #undef HAVE_AIO_RETURN64 */
198 +
199 +/* Have aio_suspend */
200 +/* #undef HAVE_AIO_SUSPEND */
201 +
202 +/* Have aio_suspend64 */
203 +/* #undef HAVE_AIO_SUSPEND64 */
204 +
205 +/* Have aio_write */
206 +/* #undef HAVE_AIO_WRITE */
207 +
208 +/* Have aio_write64 */
209 +/* #undef HAVE_AIO_WRITE64 */
210 +
211 +/* Whether AIX ACLs are available */
212 +/* #undef HAVE_AIX_ACLS */
213 +
214 +/* Define to 1 if you have the <alloca.h> header file. */
215 +#define HAVE_ALLOCA_H 1
216 +
217 +/* Whether the AP_OPTS_USE_SUBKEY ap option is available */
218 +/* #undef HAVE_AP_OPTS_USE_SUBKEY */
219 +
220 +/* Define to 1 if you have the <arpa/inet.h> header file. */
221 +#define HAVE_ARPA_INET_H 1
222 +
223 +/* check for <asm/types.h> */
224 +#define HAVE_ASM_TYPES_H 1
225 +
226 +/* Define to 1 if you have the `asprintf' function. */
227 +#define HAVE_ASPRINTF 1
228 +
229 +/* Whether asprintf() is available */
230 +#define HAVE_ASPRINTF_DECL 1
231 +
232 +/* Define to 1 if you have the `atexit' function. */
233 +#define HAVE_ATEXIT 1
234 +
235 +/* Define to 1 if you have the `attr_get' function. */
236 +/* #undef HAVE_ATTR_GET */
237 +
238 +/* Define to 1 if you have the `attr_getf' function. */
239 +/* #undef HAVE_ATTR_GETF */
240 +
241 +/* Define to 1 if you have the `attr_list' function. */
242 +/* #undef HAVE_ATTR_LIST */
243 +
244 +/* Define to 1 if you have the `attr_listf' function. */
245 +/* #undef HAVE_ATTR_LISTF */
246 +
247 +/* Define to 1 if you have the `attr_remove' function. */
248 +/* #undef HAVE_ATTR_REMOVE */
249 +
250 +/* Define to 1 if you have the `attr_removef' function. */
251 +/* #undef HAVE_ATTR_REMOVEF */
252 +
253 +/* Define to 1 if you have the `attr_set' function. */
254 +/* #undef HAVE_ATTR_SET */
255 +
256 +/* Define to 1 if you have the `attr_setf' function. */
257 +/* #undef HAVE_ATTR_SETF */
258 +
259 +/* Define to 1 if you have the <attr/xattr.h> header file. */
260 +/* #undef HAVE_ATTR_XATTR_H */
261 +
262 +/* Define to 1 if you have the `backtrace_symbols' function. */
263 +/* AR7 #define HAVE_BACKTRACE_SYMBOLS 1 */
264 +
265 +/* Define to 1 if you have the `ber_scanf' function. */
266 +/* #undef HAVE_BER_SCANF */
267 +
268 +/* What header to include for iconv() function: biconv.h */
269 +/* #undef HAVE_BICONV */
270 +
271 +/* Define to 1 if you have the `bigcrypt' function. */
272 +/* #undef HAVE_BIGCRYPT */
273 +
274 +/* Whether fcntl64 locks are broken */
275 +/* #undef HAVE_BROKEN_FCNTL64_LOCKS */
276 +
277 +/* Whether getgroups is broken */
278 +/* #undef HAVE_BROKEN_GETGROUPS */
279 +
280 +/* Whether readdir() is broken */
281 +/* #undef HAVE_BROKEN_READDIR */
282 +
283 +/* Whether there is a C99 compliant vsnprintf */
284 +#define HAVE_C99_VSNPRINTF 1
285 +
286 +/* Define to 1 if you have the <CFStringEncodingConverter.h> header file. */
287 +/* #undef HAVE_CFSTRINGENCODINGCONVERTER_H */
288 +
289 +/* Define to 1 if you have the `chmod' function. */
290 +#define HAVE_CHMOD 1
291 +
292 +/* Define to 1 if you have the `chown' function. */
293 +#define HAVE_CHOWN 1
294 +
295 +/* Define to 1 if you have the `chroot' function. */
296 +#define HAVE_CHROOT 1
297 +
298 +/* Define to 1 if you have the `chsize' function. */
299 +/* #undef HAVE_CHSIZE */
300 +
301 +/* Define to 1 if you have the `closedir64' function. */
302 +/* #undef HAVE_CLOSEDIR64 */
303 +
304 +/* Whether the compiler will optimize out function calls */
305 +#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1
306 +
307 +/* Define to 1 if you have the <com_err.h> header file. */
308 +/* #undef HAVE_COM_ERR_H */
309 +
310 +/* Whether the system has connect() */
311 +#define HAVE_CONNECT 1
312 +
313 +/* Define to 1 if you have the `copy_Authenticator' function. */
314 +/* #undef HAVE_COPY_AUTHENTICATOR */
315 +
316 +/* Define to 1 if you have the <CoreFoundation/CFStringEncodingConverter.h>
317 + header file. */
318 +/* #undef HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H */
319 +
320 +/* Define to 1 if you have the `creat64' function. */
321 +/* AR7 #define HAVE_CREAT64 1 */
322 +
323 +/* Whether the system has the crypt() function */
324 +#define HAVE_CRYPT 1
325 +
326 +/* Define to 1 if you have the `crypt16' function. */
327 +/* #undef HAVE_CRYPT16 */
328 +
329 +/* Define to 1 if you have the <ctype.h> header file. */
330 +#define HAVE_CTYPE_H 1
331 +
332 +/* Whether we have CUPS */
333 +/* #undef HAVE_CUPS */
334 +
335 +/* Define to 1 if you have the `des_set_key' function. */
336 +/* #undef HAVE_DES_SET_KEY */
337 +
338 +/* Whether the 'dev64_t' type is available */
339 +/* #undef HAVE_DEV64_T */
340 +
341 +/* Whether the major macro for dev_t is available */
342 +#define HAVE_DEVICE_MAJOR_FN 1
343 +
344 +/* Whether the minor macro for dev_t is available */
345 +#define HAVE_DEVICE_MINOR_FN 1
346 +
347 +/* Define to 1 if you have the `devnm' function. */
348 +/* #undef HAVE_DEVNM */
349 +
350 +/* Define to 1 if you have the <devnm.h> header file. */
351 +/* #undef HAVE_DEVNM_H */
352 +
353 +/* Whether dirent has a d_off member */
354 +#define HAVE_DIRENT_D_OFF 1
355 +
356 +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
357 + */
358 +#define HAVE_DIRENT_H 1
359 +
360 +/* Define to 1 if you have the `dlclose' function. */
361 +#define HAVE_DLCLOSE 1
362 +
363 +/* Define to 1 if you have the `dlerror' function. */
364 +#define HAVE_DLERROR 1
365 +
366 +/* Define to 1 if you have the <dlfcn.h> header file. */
367 +#define HAVE_DLFCN_H 1
368 +
369 +/* Define to 1 if you have the `dlopen' function. */
370 +#define HAVE_DLOPEN 1
371 +
372 +/* Define to 1 if you have the `dlsym' function. */
373 +#define HAVE_DLSYM 1
374 +
375 +/* Define to 1 if you have the `dlsym_prepend_underscore' function. */
376 +/* #undef HAVE_DLSYM_PREPEND_UNDERSCORE */
377 +
378 +/* struct dqblk .dqb_fsoftlimit */
379 +/* #undef HAVE_DQB_FSOFTLIMIT */
380 +
381 +/* Define to 1 if you have the `dup2' function. */
382 +#define HAVE_DUP2 1
383 +
384 +/* Whether the ENCTYPE_ARCFOUR_HMAC_MD5 key type is available */
385 +/* #undef HAVE_ENCTYPE_ARCFOUR_HMAC_MD5 */
386 +
387 +/* Define to 1 if you have the `endmntent' function. */
388 +#define HAVE_ENDMNTENT 1
389 +
390 +/* Define to 1 if you have the `endnetgrent' function. */
391 +/* AR7 #define HAVE_ENDNETGRENT 1 */
392 +
393 +/* Whether errno() is available */
394 +#define HAVE_ERRNO_DECL 1
395 +
396 +/* Define to 1 if you have the <execinfo.h> header file. */
397 +/* AR7 #define HAVE_EXECINFO_H 1 */
398 +
399 +
400 +/* Define to 1 if you have the `execl' function. */
401 +#define HAVE_EXECL 1
402 +
403 +/* Whether large file support can be enabled */
404 +/* AR7 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1 */
405 +
406 +/* Define to 1 if you have the `extattr_delete_fd' function. */
407 +/* #undef HAVE_EXTATTR_DELETE_FD */
408 +
409 +/* Define to 1 if you have the `extattr_delete_file' function. */
410 +/* #undef HAVE_EXTATTR_DELETE_FILE */
411 +
412 +/* Define to 1 if you have the `extattr_delete_link' function. */
413 +/* #undef HAVE_EXTATTR_DELETE_LINK */
414 +
415 +/* Define to 1 if you have the `extattr_get_fd' function. */
416 +/* #undef HAVE_EXTATTR_GET_FD */
417 +
418 +/* Define to 1 if you have the `extattr_get_file' function. */
419 +/* #undef HAVE_EXTATTR_GET_FILE */
420 +
421 +/* Define to 1 if you have the `extattr_get_link' function. */
422 +/* #undef HAVE_EXTATTR_GET_LINK */
423 +
424 +/* Define to 1 if you have the `extattr_list_fd' function. */
425 +/* #undef HAVE_EXTATTR_LIST_FD */
426 +
427 +/* Define to 1 if you have the `extattr_list_file' function. */
428 +/* #undef HAVE_EXTATTR_LIST_FILE */
429 +
430 +/* Define to 1 if you have the `extattr_list_link' function. */
431 +/* #undef HAVE_EXTATTR_LIST_LINK */
432 +
433 +/* Define to 1 if you have the `extattr_set_fd' function. */
434 +/* #undef HAVE_EXTATTR_SET_FD */
435 +
436 +/* Define to 1 if you have the `extattr_set_file' function. */
437 +/* #undef HAVE_EXTATTR_SET_FILE */
438 +
439 +/* Define to 1 if you have the `extattr_set_link' function. */
440 +/* #undef HAVE_EXTATTR_SET_LINK */
441 +
442 +/* Define to 1 if you have the `fchmod' function. */
443 +#define HAVE_FCHMOD 1
444 +
445 +/* Define to 1 if you have the `fchown' function. */
446 +#define HAVE_FCHOWN 1
447 +
448 +/* Define to 1 if you have the <fcntl.h> header file. */
449 +#define HAVE_FCNTL_H 1
450 +
451 +/* Whether fcntl locking is available */
452 +#define HAVE_FCNTL_LOCK 1
453 +
454 +/* Define to 1 if you have the `fcvt' function. */
455 +#define HAVE_FCVT 1
456 +
457 +/* Define to 1 if you have the `fcvtl' function. */
458 +/* #undef HAVE_FCVTL */
459 +
460 +/* Define to 1 if you have the `fgetxattr' function. */
461 +/* AR7 #define HAVE_FGETXATTR 1 */
462 +
463 +/* Define to 1 if you have the `flistxattr' function. */
464 +/* AR7 #define HAVE_FLISTXATTR 1 */
465 +
466 +/* Define to 1 if you have the `fopen64' function. */
467 +/* AR7 #define HAVE_FOPEN64 1 */
468 +
469 +/* Define to 1 if you have the `fremovexattr' function. */
470 +/* AR7 #define HAVE_FREMOVEXATTR 1 */
471 +
472 +/* Define to 1 if you have the `fseek64' function. */
473 +/* #undef HAVE_FSEEK64 */
474 +
475 +/* Define to 1 if you have the `fseeko64' function. */
476 +/* #define HAVE_FSEEKO64 1 */
477 +
478 +/* Define to 1 if you have the `fsetxattr' function. */
479 +/* AR7 #define HAVE_FSETXATTR 1 */
480 +
481 +/* Define to 1 if you have the `fstat' function. */
482 +#define HAVE_FSTAT 1
483 +
484 +/* Whether fstat64() is available */
485 +/* AR7 #define HAVE_FSTAT64 1 */
486 +
487 +/* Define to 1 if you have the `fsync' function. */
488 +#define HAVE_FSYNC 1
489 +
490 +/* Define to 1 if you have the `ftell64' function. */
491 +/* #undef HAVE_FTELL64 */
492 +
493 +/* Define to 1 if you have the `ftello64' function. */
494 +/* AR7 #define HAVE_FTELLO64 1 */
495 +
496 +/* Define to 1 if you have the `ftruncate' function. */
497 +#define HAVE_FTRUNCATE 1
498 +
499 +/* Define to 1 if you have the `ftruncate64' function. */
500 +/* AR7 #define HAVE_FTRUNCATE64 1 */
501 +
502 +/* Truncate extend */
503 +#define HAVE_FTRUNCATE_EXTEND 1
504 +
505 +/* Whether there is a __FUNCTION__ macro */
506 +#define HAVE_FUNCTION_MACRO 1
507 +
508 +/* Define to 1 if you have the `getauthuid' function. */
509 +/* #undef HAVE_GETAUTHUID */
510 +
511 +/* Define to 1 if you have the `getcwd' function. */
512 +#define HAVE_GETCWD 1
513 +
514 +/* Define to 1 if you have the `getdents' function. */
515 +/* #undef HAVE_GETDENTS */
516 +
517 +/* Define to 1 if you have the `getdirentries' function. */
518 +#define HAVE_GETDIRENTRIES 1
519 +
520 +/* Define to 1 if you have the `getgrent' function. */
521 +#define HAVE_GETGRENT 1
522 +
523 +/* Define to 1 if you have the `getgrnam' function. */
524 +#define HAVE_GETGRNAM 1
525 +
526 +/* Define to 1 if you have the `getgrouplist' function. */
527 +/* #undef HAVE_GETGROUPLIST */
528 +
529 +/* Define to 1 if you have the `getmntent' function. */
530 +#define HAVE_GETMNTENT 1
531 +
532 +/* Define to 1 if you have the `getnetgrent' function. */
533 +#define HAVE_GETNETGRENT 1
534 +
535 +/* Define to 1 if you have the `getprpwnam' function. */
536 +/* #undef HAVE_GETPRPWNAM */
537 +
538 +/* Define to 1 if you have the `getpwanam' function. */
539 +/* #undef HAVE_GETPWANAM */
540 +
541 +/* Define to 1 if you have the `getrlimit' function. */
542 +#define HAVE_GETRLIMIT 1
543 +
544 +/* Define to 1 if you have the `getspnam' function. */
545 +#define HAVE_GETSPNAM 1
546 +
547 +/* Whether gettimeofday() is available */
548 +#define HAVE_GETTIMEOFDAY_TZ 1
549 +
550 +/* Define to 1 if you have the `getutmpx' function. */
551 +#define HAVE_GETUTMPX 1
552 +
553 +/* Define to 1 if you have the `getxattr' function. */
554 +/* AR7 #define HAVE_GETXATTR 1 */
555 +
556 +/* What header to include for iconv() function: giconv.h */
557 +/* #undef HAVE_GICONV */
558 +
559 +/* Define to 1 if you have the `glob' function. */
560 +#define HAVE_GLOB 1
561 +
562 +/* Define to 1 if you have the <glob.h> header file. */
563 +#define HAVE_GLOB_H 1
564 +
565 +/* Define to 1 if you have the `grantpt' function. */
566 +#define HAVE_GRANTPT 1
567 +
568 +/* Define to 1 if you have the <grp.h> header file. */
569 +#define HAVE_GRP_H 1
570 +
571 +/* Whether GSSAPI is available */
572 +/* #undef HAVE_GSSAPI */
573 +
574 +/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
575 +/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
576 +
577 +/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
578 +/* #undef HAVE_GSSAPI_GSSAPI_H */
579 +
580 +/* Define to 1 if you have the <gssapi.h> header file. */
581 +/* #undef HAVE_GSSAPI_H */
582 +
583 +/* Define to 1 if you have the `gss_display_status' function. */
584 +/* #undef HAVE_GSS_DISPLAY_STATUS */
585 +
586 +/* Define to 1 if you have the <history.h> header file. */
587 +/* #undef HAVE_HISTORY_H */
588 +
589 +/* Whether HPUX ACLs are available */
590 +/* #undef HAVE_HPUX_ACLS */
591 +
592 +/* What header to include for iconv() function: iconv.h */
593 +/* AR7 #define HAVE_ICONV 1 */
594 +
595 +/* Whether iface AIX is available */
596 +/* #undef HAVE_IFACE_AIX */
597 +
598 +/* Whether iface ifconf is available */
599 +#define HAVE_IFACE_IFCONF 1
600 +
601 +/* Whether iface ifreq is available */
602 +/* #undef HAVE_IFACE_IFREQ */
603 +
604 +/* Whether the compiler supports immediate structures */
605 +#define HAVE_IMMEDIATE_STRUCTURES 1
606 +
607 +/* Define to 1 if you have the `initgroups' function. */
608 +#define HAVE_INITGROUPS 1
609 +
610 +/* Define to 1 if you have the `innetgr' function. */
611 +/* AR7 #define HAVE_INNETGR 1 */
612 +
613 +/* Whether the 'ino64_t' type is available */
614 +/* #undef HAVE_INO64_T */
615 +
616 +/* Whether int16 typedef is included by rpc/rpc.h */
617 +/* #undef HAVE_INT16_FROM_RPC_RPC_H */
618 +
619 +/* Whether int32 typedef is included by rpc/rpc.h */
620 +/* #undef HAVE_INT32_FROM_RPC_RPC_H */
621 +
622 +/* Define to 1 if you have the <inttypes.h> header file. */
623 +#define HAVE_INTTYPES_H 1
624 +
625 +/* Whether IRIX ACLs are available */
626 +/* #undef HAVE_IRIX_ACLS */
627 +
628 +/* Whether IRIX specific capabilities are available */
629 +/* #undef HAVE_IRIX_SPECIFIC_CAPABILITIES */
630 +
631 +/* Whether kernel notifies changes */
632 +#define HAVE_KERNEL_CHANGE_NOTIFY 1
633 +
634 +/* Whether IRIX kernel oplock type definitions are available */
635 +/* #undef HAVE_KERNEL_OPLOCKS_IRIX */
636 +
637 +/* Whether to use linux kernel oplocks */
638 +#define HAVE_KERNEL_OPLOCKS_LINUX 1
639 +
640 +/* Whether the kernel supports share modes */
641 +#define HAVE_KERNEL_SHARE_MODES 1
642 +
643 +/* Whether to have KRB5 support */
644 +/* #undef HAVE_KRB5 */
645 +
646 +/* Define to 1 if you have the `krb5_auth_con_setkey' function. */
647 +/* #undef HAVE_KRB5_AUTH_CON_SETKEY */
648 +
649 +/* Define to 1 if you have the `krb5_auth_con_setuseruserkey' function. */
650 +/* #undef HAVE_KRB5_AUTH_CON_SETUSERUSERKEY */
651 +
652 +/* Define to 1 if you have the `krb5_c_enctype_compare' function. */
653 +/* #undef HAVE_KRB5_C_ENCTYPE_COMPARE */
654 +
655 +/* Whether the type krb5_encrypt_block exists */
656 +/* #undef HAVE_KRB5_ENCRYPT_BLOCK */
657 +
658 +/* Define to 1 if you have the `krb5_encrypt_data' function. */
659 +/* #undef HAVE_KRB5_ENCRYPT_DATA */
660 +
661 +/* Define to 1 if you have the `krb5_enctypes_compatible_keys' function. */
662 +/* #undef HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS */
663 +
664 +/* Define to 1 if you have the `krb5_free_data_contents' function. */
665 +/* #undef HAVE_KRB5_FREE_DATA_CONTENTS */
666 +
667 +/* Define to 1 if you have the `krb5_free_keytab_entry_contents' function. */
668 +/* #undef HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS */
669 +
670 +/* Define to 1 if you have the `krb5_free_ktypes' function. */
671 +/* #undef HAVE_KRB5_FREE_KTYPES */
672 +
673 +/* Define to 1 if you have the `krb5_free_unparsed_name' function. */
674 +/* #undef HAVE_KRB5_FREE_UNPARSED_NAME */
675 +
676 +/* Define to 1 if you have the `krb5_get_default_in_tkt_etypes' function. */
677 +/* #undef HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES */
678 +
679 +/* Define to 1 if you have the `krb5_get_permitted_enctypes' function. */
680 +/* #undef HAVE_KRB5_GET_PERMITTED_ENCTYPES */
681 +
682 +/* Define to 1 if you have the `krb5_get_pw_salt' function. */
683 +/* #undef HAVE_KRB5_GET_PW_SALT */
684 +
685 +/* Define to 1 if you have the <krb5.h> header file. */
686 +/* #undef HAVE_KRB5_H */
687 +
688 +/* Whether the krb5_creds struct has a keyblock property */
689 +/* #undef HAVE_KRB5_KEYBLOCK_IN_CREDS */
690 +
691 +/* Whether the krb5_keyblock struct has a keyvalue property */
692 +/* #undef HAVE_KRB5_KEYBLOCK_KEYVALUE */
693 +
694 +/* Whether krb5_keytab_entry has key member */
695 +/* #undef HAVE_KRB5_KEYTAB_ENTRY_KEY */
696 +
697 +/* Whether krb5_keytab_entry has keyblock member */
698 +/* #undef HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK */
699 +
700 +/* Define to 1 if you have the `krb5_krbhst_get_addrinfo' function. */
701 +/* #undef HAVE_KRB5_KRBHST_GET_ADDRINFO */
702 +
703 +/* Define to 1 if you have the `krb5_kt_compare' function. */
704 +/* #undef HAVE_KRB5_KT_COMPARE */
705 +
706 +/* Define to 1 if you have the `krb5_kt_free_entry' function. */
707 +/* #undef HAVE_KRB5_KT_FREE_ENTRY */
708 +
709 +/* Define to 1 if you have the `krb5_locate_kdc' function. */
710 +/* #undef HAVE_KRB5_LOCATE_KDC */
711 +
712 +/* Define to 1 if you have the `krb5_mk_req_extended' function. */
713 +/* #undef HAVE_KRB5_MK_REQ_EXTENDED */
714 +
715 +/* Define to 1 if you have the `krb5_principal2salt' function. */
716 +/* #undef HAVE_KRB5_PRINCIPAL2SALT */
717 +
718 +/* Define to 1 if you have the `krb5_principal_get_comp_string' function. */
719 +/* #undef HAVE_KRB5_PRINCIPAL_GET_COMP_STRING */
720 +
721 +/* Whether krb5_princ_component is available */
722 +/* #undef HAVE_KRB5_PRINC_COMPONENT */
723 +
724 +/* Whether the krb5_creds struct has a session property */
725 +/* #undef HAVE_KRB5_SESSION_IN_CREDS */
726 +
727 +/* Define to 1 if you have the `krb5_set_default_in_tkt_etypes' function. */
728 +/* #undef HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES */
729 +
730 +/* Define to 1 if you have the `krb5_set_default_tgs_ktypes' function. */
731 +/* #undef HAVE_KRB5_SET_DEFAULT_TGS_KTYPES */
732 +
733 +/* Define to 1 if you have the `krb5_set_real_time' function. */
734 +/* #undef HAVE_KRB5_SET_REAL_TIME */
735 +
736 +/* Define to 1 if you have the `krb5_string_to_key' function. */
737 +/* #undef HAVE_KRB5_STRING_TO_KEY */
738 +
739 +/* Define to 1 if you have the `krb5_string_to_key_salt' function. */
740 +/* #undef HAVE_KRB5_STRING_TO_KEY_SALT */
741 +
742 +/* Whether the krb5_ticket struct has a enc_part2 property */
743 +/* #undef HAVE_KRB5_TKT_ENC_PART2 */
744 +
745 +/* Define to 1 if you have the `krb5_use_enctype' function. */
746 +/* #undef HAVE_KRB5_USE_ENCTYPE */
747 +
748 +/* Whether the KV5M_KEYTAB option is available */
749 +/* #undef HAVE_KV5M_KEYTAB */
750 +
751 +/* Define to 1 if you have the <langinfo.h> header file. */
752 +#define HAVE_LANGINFO_H 1
753 +
754 +/* Define to 1 if you have the <lastlog.h> header file. */
755 +#define HAVE_LASTLOG_H 1
756 +
757 +/* Define to 1 if you have the <lber.h> header file. */
758 +/* #undef HAVE_LBER_H */
759 +
760 +/* Whether ldap is available */
761 +/* #undef HAVE_LDAP */
762 +
763 +/* Define to 1 if you have the `ldap_domain2hostlist' function. */
764 +/* #undef HAVE_LDAP_DOMAIN2HOSTLIST */
765 +
766 +/* Define to 1 if you have the <ldap.h> header file. */
767 +/* #undef HAVE_LDAP_H */
768 +
769 +/* Define to 1 if you have the `ldap_init' function. */
770 +/* #undef HAVE_LDAP_INIT */
771 +
772 +/* Define to 1 if you have the `ldap_initialize' function. */
773 +/* #undef HAVE_LDAP_INITIALIZE */
774 +
775 +/* Define to 1 if you have the `ldap_set_rebind_proc' function. */
776 +/* #undef HAVE_LDAP_SET_REBIND_PROC */
777 +
778 +/* Define to 1 if you have the `lgetxattr' function. */
779 +/* AR7 #define HAVE_LGETXATTR 1 */
780 +
781 +/* Define to 1 if you have the `asn1' library (-lasn1). */
782 +/* #undef HAVE_LIBASN1 */
783 +
784 +/* Define to 1 if you have the `com_err' library (-lcom_err). */
785 +/* #undef HAVE_LIBCOM_ERR */
786 +
787 +/* Define to 1 if you have the `crypto' library (-lcrypto). */
788 +/* #undef HAVE_LIBCRYPTO */
789 +
790 +/* Define to 1 if you have the `dl' library (-ldl). */
791 +/* #undef HAVE_LIBDL */
792 +
793 +/* Define to 1 if you have the `exc' library (-lexc). */
794 +/* #undef HAVE_LIBEXC */
795 +
796 +/* Define to 1 if you have the <libexc.h> header file. */
797 +/* #undef HAVE_LIBEXC_H */
798 +
799 +/* Define to 1 if you have the `gen' library (-lgen). */
800 +/* #undef HAVE_LIBGEN */
801 +
802 +/* Define to 1 if you have the `gssapi' library (-lgssapi). */
803 +/* #undef HAVE_LIBGSSAPI */
804 +
805 +/* Define to 1 if you have the `gssapi_krb5' library (-lgssapi_krb5). */
806 +/* #undef HAVE_LIBGSSAPI_KRB5 */
807 +
808 +/* Define to 1 if you have the `inet' library (-linet). */
809 +/* #undef HAVE_LIBINET */
810 +
811 +/* Define to 1 if you have the `k5crypto' library (-lk5crypto). */
812 +/* #undef HAVE_LIBK5CRYPTO */
813 +
814 +/* Define to 1 if you have the `krb5' library (-lkrb5). */
815 +/* #undef HAVE_LIBKRB5 */
816 +
817 +/* Define to 1 if you have the `lber' library (-llber). */
818 +/* #undef HAVE_LIBLBER */
819 +
820 +/* Define to 1 if you have the `ldap' library (-lldap). */
821 +/* #undef HAVE_LIBLDAP */
822 +
823 +/* Define to 1 if you have the `nsl' library (-lnsl). */
824 +/* #undef HAVE_LIBNSL */
825 +
826 +/* Define to 1 if you have the `nsl_s' library (-lnsl_s). */
827 +/* #undef HAVE_LIBNSL_S */
828 +
829 +/* Whether libpam is available */
830 +#define HAVE_LIBPAM 1
831 +
832 +/* Whether the system has readline */
833 +/* AR7 #define HAVE_LIBREADLINE 1 */
834 +
835 +/* Define to 1 if you have the `resolv' library (-lresolv). */
836 +#define HAVE_LIBRESOLV 1
837 +
838 +/* Define to 1 if you have the `roken' library (-lroken). */
839 +/* #undef HAVE_LIBROKEN */
840 +
841 +/* Define to 1 if you have the `sec' library (-lsec). */
842 +/* #undef HAVE_LIBSEC */
843 +
844 +/* Define to 1 if you have the `security' library (-lsecurity). */
845 +/* #undef HAVE_LIBSECURITY */
846 +
847 +/* Define to 1 if you have the `sendfile' library (-lsendfile). */
848 +/* #undef HAVE_LIBSENDFILE */
849 +
850 +/* Define to 1 if you have the `socket' library (-lsocket). */
851 +/* #undef HAVE_LIBSOCKET */
852 +
853 +/* Define to 1 if you have the <limits.h> header file. */
854 +#define HAVE_LIMITS_H 1
855 +
856 +/* Define to 1 if you have the `link' function. */
857 +#define HAVE_LINK 1
858 +
859 +/* Whether Linux xfs quota support is available */
860 +/* AR7 #define HAVE_LINUX_XFS_QUOTAS 1 */
861 +
862 +/* Define to 1 if you have the `listxattr' function. */
863 +/* AR7 #define HAVE_LISTXATTR 1 */
864 +
865 +/* Define to 1 if you have the `llistxattr' function. */
866 +/* AR7 #define HAVE_LLISTXATTR 1 */
867 +
868 +/* Define to 1 if you have the `llseek' function. */
869 +#define HAVE_LLSEEK 1
870 +
871 +/* Define to 1 if you have the <locale.h> header file. */
872 +#define HAVE_LOCALE_H 1
873 +
874 +/* Whether the host supports long long's */
875 +#define HAVE_LONGLONG 1
876 +
877 +/* Define to 1 if you have the `lremovexattr' function. */
878 +/* AR7 #define HAVE_LREMOVEXATTR 1 */
879 +
880 +/* Define to 1 if you have the `lseek64' function. */
881 +/* AR7 #define HAVE_LSEEK64 1 */
882 +
883 +/* Define to 1 if you have the `lsetxattr' function. */
884 +/* AR7 #define HAVE_LSETXATTR 1 */
885 +
886 +/* Define to 1 if you have the `lstat64' function. */
887 +/* AR7 #define HAVE_LSTAT64 1 */
888 +
889 +/* Whether the macro for makedev is available */
890 +#define HAVE_MAKEDEV 1
891 +
892 +/* Define to 1 if you have the `memmove' function. */
893 +#define HAVE_MEMMOVE 1
894 +
895 +/* Define to 1 if you have the <memory.h> header file. */
896 +#define HAVE_MEMORY_H 1
897 +
898 +/* Whether memset() is available */
899 +#define HAVE_MEMSET 1
900 +
901 +/* Define to 1 if you have the `mknod' function. */
902 +#define HAVE_MKNOD 1
903 +
904 +/* Define to 1 if you have the `mknod64' function. */
905 +/* #undef HAVE_MKNOD64 */
906 +
907 +/* Define to 1 if you have the `mktime' function. */
908 +#define HAVE_MKTIME 1
909 +
910 +/* Whether mmap works */
911 +#define HAVE_MMAP 1
912 +
913 +/* Define to 1 if you have the <mntent.h> header file. */
914 +#define HAVE_MNTENT_H 1
915 +
916 +/* Define to 1 if you have the `nanosleep' function. */
917 +#define HAVE_NANOSLEEP 1
918 +
919 +/* Whether to use native iconv */
920 +/* AR7 #define HAVE_NATIVE_ICONV 1 */
921 +
922 +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
923 +/* #undef HAVE_NDIR_H */
924 +
925 +/* Define to 1 if you have the <netinet/in_ip.h> header file. */
926 +/* #undef HAVE_NETINET_IN_IP_H */
927 +
928 +/* Define to 1 if you have the <netinet/in_systm.h> header file. */
929 +#define HAVE_NETINET_IN_SYSTM_H 1
930 +
931 +/* Define to 1 if you have the <netinet/ip.h> header file. */
932 +#define HAVE_NETINET_IP_H 1
933 +
934 +/* Define to 1 if you have the <netinet/tcp.h> header file. */
935 +#define HAVE_NETINET_TCP_H 1
936 +
937 +/* Define to 1 if you have the <net/if.h> header file. */
938 +#define HAVE_NET_IF_H 1
939 +
940 +/* Do we have rl_completion_matches? */
941 +/* AR7 #define HAVE_NEW_LIBREADLINE 1 */
942 +
943 +/* Define to 1 if you have the `nl_langinfo' function. */
944 +#define HAVE_NL_LANGINFO 1
945 +
946 +/* Whether no ACLs support is available */
947 +#define HAVE_NO_ACLS 1
948 +
949 +/* Whether no asynchronous io support is available */
950 +#define HAVE_NO_AIO 1
951 +
952 +/* Define to 1 if you have the <nsswitch.h> header file. */
953 +/* #undef HAVE_NSSWITCH_H */
954 +
955 +/* Define to 1 if you have the <nss_common.h> header file. */
956 +/* #undef HAVE_NSS_COMMON_H */
957 +
958 +/* Define to 1 if you have the <nss.h> header file. */
959 +/* AR7 #define HAVE_NSS_H 1 */
960 +
961 +/* Define to 1 if you have the <ns_api.h> header file. */
962 +/* #undef HAVE_NS_API_H */
963 +
964 +/* Whether off64_t is available */
965 +/* #undef HAVE_OFF64_T */
966 +
967 +/* Define to 1 if you have the `open64' function. */
968 +/* AR7 #define HAVE_OPEN64 1 */
969 +
970 +/* Define to 1 if you have the `opendir64' function. */
971 +/* #undef HAVE_OPENDIR64 */
972 +
973 +/* Defined if struct passwd has pw_age field */
974 +/* #undef HAVE_PASSWD_PW_AGE */
975 +
976 +/* Defined if struct passwd has pw_comment field */
977 +/* #undef HAVE_PASSWD_PW_COMMENT */
978 +
979 +/* Define to 1 if you have the `pathconf' function. */
980 +#define HAVE_PATHCONF 1
981 +
982 +/* Define to 1 if you have the `pipe' function. */
983 +#define HAVE_PIPE 1
984 +
985 +/* Define to 1 if you have the `poll' function. */
986 +#define HAVE_POLL 1
987 +
988 +/* Define to 1 if you have the <poll.h> header file. */
989 +#define HAVE_POLL_H 1
990 +
991 +/* Whether POSIX ACLs are available */
992 +/* #undef HAVE_POSIX_ACLS */
993 +
994 +/* Whether prctl is available */
995 +#define HAVE_PRCTL 1
996 +
997 +/* Define to 1 if you have the `pread' function. */
998 +#define HAVE_PREAD 1
999 +
1000 +/* Define to 1 if you have the `pread64' function. */
1001 +/* AR7 #define HAVE_PREAD64 1 */
1002 +
1003 +/* Define to 1 if you have the `putprpwnam' function. */
1004 +/* #undef HAVE_PUTPRPWNAM */
1005 +
1006 +/* Define to 1 if you have the `pututline' function. */
1007 +#define HAVE_PUTUTLINE 1
1008 +
1009 +/* Define to 1 if you have the `pututxline' function. */
1010 +#define HAVE_PUTUTXLINE 1
1011 +
1012 +/* Define to 1 if you have the `pwrite' function. */
1013 +#define HAVE_PWRITE 1
1014 +
1015 +/* Define to 1 if you have the `pwrite64' function. */
1016 +/* AR7 #define HAVE_PWRITE64 1 */
1017 +
1018 +/* Whether CRAY int quotactl (char *spec, int request, char *arg); is
1019 + available */
1020 +/* #undef HAVE_QUOTACTL_3 */
1021 +
1022 +/* Whether long quotactl(int cmd, char *special, qid_t id, caddr_t addr) is
1023 + available */
1024 +/* #undef HAVE_QUOTACTL_4A */
1025 +
1026 +/* Whether int quotactl(const char *path, int cmd, int id, char *addr) is
1027 + available */
1028 +/* #undef HAVE_QUOTACTL_4B */
1029 +
1030 +/* Whether Linux quota support is available */
1031 +/* AR7 #define HAVE_QUOTACTL_LINUX 1 */
1032 +
1033 +/* Define to 1 if you have the `rand' function. */
1034 +#define HAVE_RAND 1
1035 +
1036 +/* Define to 1 if you have the `random' function. */
1037 +#define HAVE_RANDOM 1
1038 +
1039 +/* Define to 1 if you have the `rdchk' function. */
1040 +/* #undef HAVE_RDCHK */
1041 +
1042 +/* Define to 1 if you have the `readdir64' function. */
1043 +/* AR7 #define HAVE_READDIR64 1 */
1044 +
1045 +/* Define to 1 if you have the <readline.h> header file. */
1046 +/* #undef HAVE_READLINE_H */
1047 +
1048 +/* Define to 1 if you have the <readline/history.h> header file. */
1049 +#define HAVE_READLINE_HISTORY_H 1
1050 +
1051 +/* Define to 1 if you have the <readline/readline.h> header file. */
1052 +#define HAVE_READLINE_READLINE_H 1
1053 +
1054 +/* Define to 1 if you have the `readlink' function. */
1055 +#define HAVE_READLINK 1
1056 +
1057 +/* Define to 1 if you have the `realpath' function. */
1058 +#define HAVE_REALPATH 1
1059 +
1060 +/* Define to 1 if you have the `removexattr' function. */
1061 +/* AR7 #define HAVE_REMOVEXATTR 1 */
1062 +
1063 +/* Define to 1 if you have the `rename' function. */
1064 +#define HAVE_RENAME 1
1065 +
1066 +/* Define to 1 if you have the `rewinddir64' function. */
1067 +/* #undef HAVE_REWINDDIR64 */
1068 +
1069 +/* Define to 1 if you have the `roken_getaddrinfo_hostspec' function. */
1070 +/* #undef HAVE_ROKEN_GETADDRINFO_HOSTSPEC */
1071 +
1072 +/* Whether current user is root */
1073 +/* #undef HAVE_ROOT */
1074 +
1075 +/* Define to 1 if you have the <rpcsvc/nis.h> header file. */
1076 +#define HAVE_RPCSVC_NIS_H 1
1077 +
1078 +/* Define to 1 if you have the <rpcsvc/ypclnt.h> header file. */
1079 +#define HAVE_RPCSVC_YPCLNT_H 1
1080 +
1081 +/* Define to 1 if you have the <rpcsvc/yp_prot.h> header file. */
1082 +#define HAVE_RPCSVC_YP_PROT_H 1
1083 +
1084 +/* Whether there is a conflicting AUTH_ERROR define in rpc/rpc.h */
1085 +/* #undef HAVE_RPC_AUTH_ERROR_CONFLICT */
1086 +
1087 +/* Define to 1 if you have the <rpc/nettype.h> header file. */
1088 +/* #undef HAVE_RPC_NETTYPE_H */
1089 +
1090 +/* Define to 1 if you have the <rpc/rpc.h> header file. */
1091 +#define HAVE_RPC_RPC_H 1
1092 +
1093 +/* Whether mkstemp is secure */
1094 +#define HAVE_SECURE_MKSTEMP 1
1095 +
1096 +/* Define to 1 if you have the <security/pam_appl.h> header file. */
1097 +#define HAVE_SECURITY_PAM_APPL_H 1
1098 +
1099 +/* Define to 1 if you have the <security/pam_modules.h> header file. */
1100 +#define HAVE_SECURITY_PAM_MODULES_H 1
1101 +
1102 +/* Define to 1 if you have the <security/_pam_macros.h> header file. */
1103 +#define HAVE_SECURITY__PAM_MACROS_H 1
1104 +
1105 +/* Define to 1 if you have the `seekdir64' function. */
1106 +/* #undef HAVE_SEEKDIR64 */
1107 +
1108 +/* Define to 1 if you have the `select' function. */
1109 +#define HAVE_SELECT 1
1110 +
1111 +/* Whether sendfile() is available */
1112 +/* #undef HAVE_SENDFILE */
1113 +
1114 +/* Whether sendfile64() is available */
1115 +/* AR7 #define HAVE_SENDFILE64 1 */
1116 +
1117 +/* Whether sendfilev() is available */
1118 +/* #undef HAVE_SENDFILEV */
1119 +
1120 +/* Whether sendfilev64() is available */
1121 +/* #undef HAVE_SENDFILEV64 */
1122 +
1123 +/* Define to 1 if you have the `setbuffer' function. */
1124 +#define HAVE_SETBUFFER 1
1125 +
1126 +/* Define to 1 if you have the `setenv' function. */
1127 +#define HAVE_SETENV 1
1128 +
1129 +/* Define to 1 if you have the `setgidx' function. */
1130 +/* #undef HAVE_SETGIDX */
1131 +
1132 +/* Define to 1 if you have the `setgroups' function. */
1133 +#define HAVE_SETGROUPS 1
1134 +
1135 +/* Define to 1 if you have the `setlinebuf' function. */
1136 +#define HAVE_SETLINEBUF 1
1137 +
1138 +/* Define to 1 if you have the `setlocale' function. */
1139 +#define HAVE_SETLOCALE 1
1140 +
1141 +/* Define to 1 if you have the `setluid' function. */
1142 +/* #undef HAVE_SETLUID */
1143 +
1144 +/* Define to 1 if you have the `setmntent' function. */
1145 +#define HAVE_SETMNTENT 1
1146 +
1147 +/* Define to 1 if you have the `setnetgrent' function. */
1148 +#define HAVE_SETNETGRENT 1
1149 +
1150 +/* Define to 1 if you have the `setpgid' function. */
1151 +#define HAVE_SETPGID 1
1152 +
1153 +/* Define to 1 if you have the `setpriv' function. */
1154 +/* #undef HAVE_SETPRIV */
1155 +
1156 +/* Whether the system has setresgid */
1157 +#define HAVE_SETRESGID 1
1158 +
1159 +/* Whether setresgid() is available */
1160 +#define HAVE_SETRESGID_DECL 1
1161 +
1162 +/* Whether the system has setresuid */
1163 +#define HAVE_SETRESUID 1
1164 +
1165 +/* Whether setresuid() is available */
1166 +#define HAVE_SETRESUID_DECL 1
1167 +
1168 +/* Define to 1 if you have the `setsid' function. */
1169 +#define HAVE_SETSID 1
1170 +
1171 +/* Define to 1 if you have the `setuidx' function. */
1172 +/* #undef HAVE_SETUIDX */
1173 +
1174 +/* Define to 1 if you have the `setxattr' function. */
1175 +/* AR7 #define HAVE_SETXATTR 1 */
1176 +
1177 +/* Define to 1 if you have the `set_auth_parameters' function. */
1178 +/* #undef HAVE_SET_AUTH_PARAMETERS */
1179 +
1180 +/* Define to 1 if you have the <shadow.h> header file. */
1181 +#define HAVE_SHADOW_H 1
1182 +
1183 +/* Define to 1 if you have the `shmget' function. */
1184 +#define HAVE_SHMGET 1
1185 +
1186 +/* Define to 1 if you have the `shm_open' function. */
1187 +/* #undef HAVE_SHM_OPEN */
1188 +
1189 +/* Define to 1 if you have the `sigaction' function. */
1190 +#define HAVE_SIGACTION 1
1191 +
1192 +/* Define to 1 if you have the `sigblock' function. */
1193 +#define HAVE_SIGBLOCK 1
1194 +
1195 +/* Define to 1 if you have the `sigprocmask' function. */
1196 +#define HAVE_SIGPROCMASK 1
1197 +
1198 +/* Define to 1 if you have the `sigset' function. */
1199 +#define HAVE_SIGSET 1
1200 +
1201 +/* Whether we have the atomic_t variable type */
1202 +#define HAVE_SIG_ATOMIC_T_TYPE 1
1203 +
1204 +/* Define to 1 if you have the `snprintf' function. */
1205 +#define HAVE_SNPRINTF 1
1206 +
1207 +/* Whether snprintf() is available */
1208 +#define HAVE_SNPRINTF_DECL 1
1209 +
1210 +/* Whether we have the variable type socklen_t */
1211 +#define HAVE_SOCKLEN_T_TYPE 1
1212 +
1213 +/* Whether the sockaddr_in struct has a sin_len property */
1214 +/* #undef HAVE_SOCK_SIN_LEN */
1215 +
1216 +/* Whether solaris ACLs are available */
1217 +/* #undef HAVE_SOLARIS_ACLS */
1218 +
1219 +/* Define to 1 if you have the `srand' function. */
1220 +#define HAVE_SRAND 1
1221 +
1222 +/* Define to 1 if you have the `srandom' function. */
1223 +#define HAVE_SRANDOM 1
1224 +
1225 +/* Whether stat64() is available */
1226 +/* AR7 #define HAVE_STAT64 1 */
1227 +
1228 +/* whether struct stat has sub-second timestamps */
1229 +/* AR7 #define HAVE_STAT_HIRES_TIMESTAMPS 1 */
1230 +
1231 +/* whether struct stat contains st_atim */
1232 +#define HAVE_STAT_ST_ATIM 1
1233 +
1234 +/* Whether the stat struct has a st_blksize property */
1235 +#define HAVE_STAT_ST_BLKSIZE 1
1236 +
1237 +/* Whether the stat struct has a st_block property */
1238 +#define HAVE_STAT_ST_BLOCKS 1
1239 +
1240 +/* whether struct stat contains st_ctim */
1241 +#define HAVE_STAT_ST_CTIM 1
1242 +
1243 +/* whether struct stat contains st_mtim */
1244 +#define HAVE_STAT_ST_MTIM 1
1245 +
1246 +/* Define to 1 if you have the <stdarg.h> header file. */
1247 +#define HAVE_STDARG_H 1
1248 +
1249 +/* Define to 1 if you have the <stdint.h> header file. */
1250 +#define HAVE_STDINT_H 1
1251 +
1252 +/* Define to 1 if you have the <stdlib.h> header file. */
1253 +#define HAVE_STDLIB_H 1
1254 +
1255 +/* Define to 1 if you have the `strcasecmp' function. */
1256 +#define HAVE_STRCASECMP 1
1257 +
1258 +/* Define to 1 if you have the `strchr' function. */
1259 +#define HAVE_STRCHR 1
1260 +
1261 +/* Define to 1 if you have the `strdup' function. */
1262 +#define HAVE_STRDUP 1
1263 +
1264 +/* Define to 1 if you have the `strerror' function. */
1265 +#define HAVE_STRERROR 1
1266 +
1267 +/* Define to 1 if you have the `strftime' function. */
1268 +#define HAVE_STRFTIME 1
1269 +
1270 +/* Define to 1 if you have the <strings.h> header file. */
1271 +#define HAVE_STRINGS_H 1
1272 +
1273 +/* Define to 1 if you have the <string.h> header file. */
1274 +#define HAVE_STRING_H 1
1275 +
1276 +/* Define to 1 if you have the `strlcat' function. */
1277 +/* #undef HAVE_STRLCAT */
1278 +
1279 +/* Define to 1 if you have the `strlcpy' function. */
1280 +/* #undef HAVE_STRLCPY */
1281 +
1282 +/* Define to 1 if you have the `strndup' function. */
1283 +#define HAVE_STRNDUP 1
1284 +
1285 +/* Define to 1 if you have the `strnlen' function. */
1286 +#define HAVE_STRNLEN 1
1287 +
1288 +/* Define to 1 if you have the <stropts.h> header file. */
1289 +/* AR7 #define HAVE_STROPTS_H 1 */
1290 +
1291 +/* Define to 1 if you have the `strpbrk' function. */
1292 +#define HAVE_STRPBRK 1
1293 +
1294 +/* Define to 1 if you have the `strtoul' function. */
1295 +#define HAVE_STRTOUL 1
1296 +
1297 +/* Whether the 'DIR64' abstract data type is available */
1298 +/* #undef HAVE_STRUCT_DIR64 */
1299 +
1300 +/* Whether the 'dirent64' struct is available */
1301 +/* AR7 #define HAVE_STRUCT_DIRENT64 1 */
1302 +
1303 +/* Whether the flock64 struct is available */
1304 +/* AR7 #define HAVE_STRUCT_FLOCK64 1 */
1305 +
1306 +/* Define to 1 if `method_attrlist' is member of `struct secmethod_table'. */
1307 +/* #undef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST */
1308 +
1309 +/* Define to 1 if `method_version' is member of `struct secmethod_table'. */
1310 +/* #undef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_VERSION */
1311 +
1312 +/* Define to 1 if `st_rdev' is member of `struct stat'. */
1313 +#define HAVE_STRUCT_STAT_ST_RDEV 1
1314 +
1315 +/* Whether we have struct timespec */
1316 +#define HAVE_STRUCT_TIMESPEC 1
1317 +
1318 +/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use
1319 + `HAVE_STRUCT_STAT_ST_RDEV' instead. */
1320 +#define HAVE_ST_RDEV 1
1321 +
1322 +/* Define to 1 if you have the `symlink' function. */
1323 +#define HAVE_SYMLINK 1
1324 +
1325 +/* Define to 1 if you have the `syscall' function. */
1326 +#define HAVE_SYSCALL 1
1327 +
1328 +/* Define to 1 if you have the <syscall.h> header file. */
1329 +#define HAVE_SYSCALL_H 1
1330 +
1331 +/* Define to 1 if you have the `sysconf' function. */
1332 +#define HAVE_SYSCONF 1
1333 +
1334 +/* Define to 1 if you have the `syslog' function. */
1335 +#define HAVE_SYSLOG 1
1336 +
1337 +/* Define to 1 if you have the <syslog.h> header file. */
1338 +#define HAVE_SYSLOG_H 1
1339 +
1340 +/* Define to 1 if you have the <sys/acl.h> header file. */
1341 +/* #undef HAVE_SYS_ACL_H */
1342 +
1343 +/* Define to 1 if you have the <sys/attributes.h> header file. */
1344 +/* #undef HAVE_SYS_ATTRIBUTES_H */
1345 +
1346 +/* Define to 1 if you have the <sys/capability.h> header file. */
1347 +/* #undef HAVE_SYS_CAPABILITY_H */
1348 +
1349 +/* Define to 1 if you have the <sys/cdefs.h> header file. */
1350 +#define HAVE_SYS_CDEFS_H 1
1351 +
1352 +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
1353 + */
1354 +/* #undef HAVE_SYS_DIR_H */
1355 +
1356 +/* Define to 1 if you have the <sys/dustat.h> header file. */
1357 +/* #undef HAVE_SYS_DUSTAT_H */
1358 +
1359 +/* Define to 1 if you have the <sys/extattr.h> header file. */
1360 +/* #undef HAVE_SYS_EXTATTR_H */
1361 +
1362 +/* Define to 1 if you have the <sys/fcntl.h> header file. */
1363 +#define HAVE_SYS_FCNTL_H 1
1364 +
1365 +/* Define to 1 if you have the <sys/filio.h> header file. */
1366 +/* #undef HAVE_SYS_FILIO_H */
1367 +
1368 +/* Define to 1 if you have the <sys/filsys.h> header file. */
1369 +/* #undef HAVE_SYS_FILSYS_H */
1370 +
1371 +/* Define to 1 if you have the <sys/fs/s5param.h> header file. */
1372 +/* #undef HAVE_SYS_FS_S5PARAM_H */
1373 +
1374 +/* Define to 1 if you have the <sys/fs/vx_quota.h> header file. */
1375 +/* #undef HAVE_SYS_FS_VX_QUOTA_H */
1376 +
1377 +/* Define to 1 if you have the <sys/id.h> header file. */
1378 +/* #undef HAVE_SYS_ID_H */
1379 +
1380 +/* Define to 1 if you have the <sys/ioctl.h> header file. */
1381 +#define HAVE_SYS_IOCTL_H 1
1382 +
1383 +/* Define to 1 if you have the <sys/ipc.h> header file. */
1384 +#define HAVE_SYS_IPC_H 1
1385 +
1386 +/* Define to 1 if you have the <sys/mman.h> header file. */
1387 +#define HAVE_SYS_MMAN_H 1
1388 +
1389 +/* Define to 1 if you have the <sys/mode.h> header file. */
1390 +/* #undef HAVE_SYS_MODE_H */
1391 +
1392 +/* Define to 1 if you have the <sys/mount.h> header file. */
1393 +#define HAVE_SYS_MOUNT_H 1
1394 +
1395 +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
1396 + */
1397 +/* #undef HAVE_SYS_NDIR_H */
1398 +
1399 +/* Define to 1 if you have the <sys/param.h> header file. */
1400 +#define HAVE_SYS_PARAM_H 1
1401 +
1402 +/* Define to 1 if you have the <sys/prctl.h> header file. */
1403 +#define HAVE_SYS_PRCTL_H 1
1404 +
1405 +/* Define to 1 if you have the <sys/priv.h> header file. */
1406 +/* #undef HAVE_SYS_PRIV_H */
1407 +
1408 +/* Whether the new lib/sysquotas.c interface can be used */
1409 +/* AR7 #define HAVE_SYS_QUOTAS 1 */
1410 +
1411 +/* Define to 1 if you have the <sys/quota.h> header file. */
1412 +/* AR7 #define HAVE_SYS_QUOTA_H 1 */
1413 +
1414 +/* Define to 1 if you have the <sys/resource.h> header file. */
1415 +#define HAVE_SYS_RESOURCE_H 1
1416 +
1417 +/* Define to 1 if you have the <sys/security.h> header file. */
1418 +/* #undef HAVE_SYS_SECURITY_H */
1419 +
1420 +/* Define to 1 if you have the <sys/select.h> header file. */
1421 +#define HAVE_SYS_SELECT_H 1
1422 +
1423 +/* Define to 1 if you have the <sys/shm.h> header file. */
1424 +#define HAVE_SYS_SHM_H 1
1425 +
1426 +/* Define to 1 if you have the <sys/socket.h> header file. */
1427 +#define HAVE_SYS_SOCKET_H 1
1428 +
1429 +/* Define to 1 if you have the <sys/sockio.h> header file. */
1430 +/* #undef HAVE_SYS_SOCKIO_H */
1431 +
1432 +/* Define to 1 if you have the <sys/statfs.h> header file. */
1433 +#define HAVE_SYS_STATFS_H 1
1434 +
1435 +/* Define to 1 if you have the <sys/statvfs.h> header file. */
1436 +#define HAVE_SYS_STATVFS_H 1
1437 +
1438 +/* Define to 1 if you have the <sys/stat.h> header file. */
1439 +#define HAVE_SYS_STAT_H 1
1440 +
1441 +/* Define to 1 if you have the <sys/syscall.h> header file. */
1442 +#define HAVE_SYS_SYSCALL_H 1
1443 +
1444 +/* Define to 1 if you have the <sys/syslog.h> header file. */
1445 +#define HAVE_SYS_SYSLOG_H 1
1446 +
1447 +/* Define to 1 if you have the <sys/sysmacros.h> header file. */
1448 +#define HAVE_SYS_SYSMACROS_H 1
1449 +
1450 +/* Define to 1 if you have the <sys/termio.h> header file. */
1451 +/* #undef HAVE_SYS_TERMIO_H */
1452 +
1453 +/* Define to 1 if you have the <sys/time.h> header file. */
1454 +#define HAVE_SYS_TIME_H 1
1455 +
1456 +/* Define to 1 if you have the <sys/types.h> header file. */
1457 +#define HAVE_SYS_TYPES_H 1
1458 +
1459 +/* Define to 1 if you have the <sys/uio.h> header file. */
1460 +#define HAVE_SYS_UIO_H 1
1461 +
1462 +/* Define to 1 if you have the <sys/unistd.h> header file. */
1463 +#define HAVE_SYS_UNISTD_H 1
1464 +
1465 +/* Define to 1 if you have the <sys/un.h> header file. */
1466 +#define HAVE_SYS_UN_H 1
1467 +
1468 +/* Define to 1 if you have the <sys/vfs.h> header file. */
1469 +#define HAVE_SYS_VFS_H 1
1470 +
1471 +/* Define to 1 if you have the <sys/wait.h> header file. */
1472 +#define HAVE_SYS_WAIT_H 1
1473 +
1474 +/* Define to 1 if you have the <sys/xattr.h> header file. */
1475 +/* AR7 #define HAVE_SYS_XATTR_H 1 */
1476 +
1477 +/* Define to 1 if you have the `telldir64' function. */
1478 +/* #undef HAVE_TELLDIR64 */
1479 +
1480 +/* Define to 1 if you have the <termios.h> header file. */
1481 +#define HAVE_TERMIOS_H 1
1482 +
1483 +/* Define to 1 if you have the <termio.h> header file. */
1484 +#define HAVE_TERMIO_H 1
1485 +
1486 +/* Define to 1 if you have the `timegm' function. */
1487 +/* AR7 #define HAVE_TIMEGM 1 */
1488 +
1489 +/* Whether Tru64 ACLs are available */
1490 +/* #undef HAVE_TRU64_ACLS */
1491 +
1492 +/* Whether crypt needs truncated salt */
1493 +/* #undef HAVE_TRUNCATED_SALT */
1494 +
1495 +/* Whether uint16 typedef is included by rpc/rpc.h */
1496 +/* #undef HAVE_UINT16_FROM_RPC_RPC_H */
1497 +
1498 +/* Whether uint32 typedef is included by rpc/rpc.h */
1499 +/* #undef HAVE_UINT32_FROM_RPC_RPC_H */
1500 +
1501 +/* Define to 1 if you have the <unistd.h> header file. */
1502 +#define HAVE_UNISTD_H 1
1503 +
1504 +/* If we need to build with unixscoket support */
1505 +#define HAVE_UNIXSOCKET 1
1506 +
1507 +/* Whether UnixWare ACLs are available */
1508 +/* #undef HAVE_UNIXWARE_ACLS */
1509 +
1510 +/* Whether the 'unsigned char' type is available */
1511 +/* #undef HAVE_UNSIGNED_CHAR */
1512 +
1513 +/* Define to 1 if you have the `updwtmp' function. */
1514 +#define HAVE_UPDWTMP 1
1515 +
1516 +/* Define to 1 if you have the `updwtmpx' function. */
1517 +#define HAVE_UPDWTMPX 1
1518 +
1519 +/* Define to 1 if you have the `usleep' function. */
1520 +#define HAVE_USLEEP 1
1521 +
1522 +/* Whether struct utimbuf is available */
1523 +#define HAVE_UTIMBUF 1
1524 +
1525 +/* Define to 1 if you have the `utime' function. */
1526 +#define HAVE_UTIME 1
1527 +
1528 +/* Define to 1 if you have the `utimes' function. */
1529 +#define HAVE_UTIMES 1
1530 +
1531 +/* Define to 1 if you have the <utime.h> header file. */
1532 +#define HAVE_UTIME_H 1
1533 +
1534 +/* Define to 1 if you have the <utmpx.h> header file. */
1535 +/* #define HAVE_UTMPX_H 1 */
1536 +
1537 +/* Define to 1 if you have the <utmp.h> header file. */
1538 +#define HAVE_UTMP_H 1
1539 +
1540 +/* Whether the utmp struct has a property ut_addr */
1541 +#define HAVE_UT_UT_ADDR 1
1542 +
1543 +/* Whether the utmp struct has a property ut_exit */
1544 +#define HAVE_UT_UT_EXIT 1
1545 +
1546 +/* Whether the utmp struct has a property ut_host */
1547 +#define HAVE_UT_UT_HOST 1
1548 +
1549 +/* Whether the utmp struct has a property ut_id */
1550 +#define HAVE_UT_UT_ID 1
1551 +
1552 +/* Whether the utmp struct has a property ut_name */
1553 +#define HAVE_UT_UT_NAME 1
1554 +
1555 +/* Whether the utmp struct has a property ut_pid */
1556 +#define HAVE_UT_UT_PID 1
1557 +
1558 +/* Whether the utmp struct has a property ut_time */
1559 +#define HAVE_UT_UT_TIME 1
1560 +
1561 +/* Whether the utmp struct has a property ut_tv */
1562 +#define HAVE_UT_UT_TV 1
1563 +
1564 +/* Whether the utmp struct has a property ut_type */
1565 +#define HAVE_UT_UT_TYPE 1
1566 +
1567 +/* Whether the utmp struct has a property ut_user */
1568 +#define HAVE_UT_UT_USER 1
1569 +
1570 +/* Whether the utmpx struct has a property ut_syslen */
1571 +/* #undef HAVE_UX_UT_SYSLEN */
1572 +
1573 +/* Define to 1 if you have the <valgrind.h> header file. */
1574 +/* #undef HAVE_VALGRIND_H */
1575 +
1576 +/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
1577 +/* #undef HAVE_VALGRIND_MEMCHECK_H */
1578 +
1579 +/* Define to 1 if you have the <valgrind/valgrind.h> header file. */
1580 +/* #undef HAVE_VALGRIND_VALGRIND_H */
1581 +
1582 +/* Define to 1 if you have the `vasprintf' function. */
1583 +#define HAVE_VASPRINTF 1
1584 +
1585 +/* Whether vasprintf() is available */
1586 +#define HAVE_VASPRINTF_DECL 1
1587 +
1588 +/* Whether va_copy() is available */
1589 +#define HAVE_VA_COPY 1
1590 +
1591 +/* Whether the C compiler understands volatile */
1592 +#define HAVE_VOLATILE 1
1593 +
1594 +/* Define to 1 if you have the `vsnprintf' function. */
1595 +#define HAVE_VSNPRINTF 1
1596 +
1597 +/* Whether vsnprintf() is available */
1598 +#define HAVE_VSNPRINTF_DECL 1
1599 +
1600 +/* Define to 1 if you have the `vsyslog' function. */
1601 +#define HAVE_VSYSLOG 1
1602 +
1603 +/* Define to 1 if you have the `waitpid' function. */
1604 +#define HAVE_WAITPID 1
1605 +
1606 +/* Define if you have working AF_LOCAL sockets */
1607 +#define HAVE_WORKING_AF_LOCAL 1
1608 +
1609 +/* Whether the WRFILE:-keytab is supported */
1610 +/* #undef HAVE_WRFILE_KEYTAB */
1611 +
1612 +/* Whether xfs quota support is available */
1613 +/* AR7 #define HAVE_XFS_QUOTAS 1 */
1614 +
1615 +/* Define to 1 if you have the `yp_get_default_domain' function. */
1616 +#define HAVE_YP_GET_DEFAULT_DOMAIN 1
1617 +
1618 +/* Define to 1 if you have the `_acl' function. */
1619 +/* #undef HAVE__ACL */
1620 +
1621 +/* Define to 1 if you have the `_chdir' function. */
1622 +/* #undef HAVE__CHDIR */
1623 +
1624 +/* Define to 1 if you have the `_close' function. */
1625 +/* #undef HAVE__CLOSE */
1626 +
1627 +/* Define to 1 if you have the `_closedir' function. */
1628 +/* #undef HAVE__CLOSEDIR */
1629 +
1630 +/* Define to 1 if you have the `_dup' function. */
1631 +/* #undef HAVE__DUP */
1632 +
1633 +/* Define to 1 if you have the `_dup2' function. */
1634 +/* #undef HAVE__DUP2 */
1635 +
1636 +/* Define to 1 if you have the `_et_list' function. */
1637 +/* #undef HAVE__ET_LIST */
1638 +
1639 +/* Define to 1 if you have the `_facl' function. */
1640 +/* #undef HAVE__FACL */
1641 +
1642 +/* Define to 1 if you have the `_fchdir' function. */
1643 +/* #undef HAVE__FCHDIR */
1644 +
1645 +/* Define to 1 if you have the `_fcntl' function. */
1646 +/* #undef HAVE__FCNTL */
1647 +
1648 +/* Define to 1 if you have the `_fork' function. */
1649 +/* #undef HAVE__FORK */
1650 +
1651 +/* Define to 1 if you have the `_fstat' function. */
1652 +/* #undef HAVE__FSTAT */
1653 +
1654 +/* Define to 1 if you have the `_fstat64' function. */
1655 +/* #undef HAVE__FSTAT64 */
1656 +
1657 +/* Define to 1 if you have the `_getcwd' function. */
1658 +/* #undef HAVE__GETCWD */
1659 +
1660 +/* Define to 1 if you have the `_getdents' function. */
1661 +/* #undef HAVE__GETDENTS */
1662 +
1663 +/* Define to 1 if you have the `_llseek' function. */
1664 +/* #undef HAVE__LLSEEK */
1665 +
1666 +/* Define to 1 if you have the `_lseek' function. */
1667 +/* #undef HAVE__LSEEK */
1668 +
1669 +/* Define to 1 if you have the `_lstat' function. */
1670 +/* #undef HAVE__LSTAT */
1671 +
1672 +/* Define to 1 if you have the `_lstat64' function. */
1673 +/* #undef HAVE__LSTAT64 */
1674 +
1675 +/* Define to 1 if you have the `_open' function. */
1676 +/* #undef HAVE__OPEN */
1677 +
1678 +/* Define to 1 if you have the `_open64' function. */
1679 +/* #undef HAVE__OPEN64 */
1680 +
1681 +/* Define to 1 if you have the `_opendir' function. */
1682 +/* #undef HAVE__OPENDIR */
1683 +
1684 +/* Define to 1 if you have the `_pread' function. */
1685 +/* #undef HAVE__PREAD */
1686 +
1687 +/* Define to 1 if you have the `_pread64' function. */
1688 +/* #undef HAVE__PREAD64 */
1689 +
1690 +/* Define to 1 if you have the `_pwrite' function. */
1691 +/* #undef HAVE__PWRITE */
1692 +
1693 +/* Define to 1 if you have the `_pwrite64' function. */
1694 +/* #undef HAVE__PWRITE64 */
1695 +
1696 +/* Define to 1 if you have the `_read' function. */
1697 +/* #undef HAVE__READ */
1698 +
1699 +/* Define to 1 if you have the `_readdir' function. */
1700 +/* #undef HAVE__READDIR */
1701 +
1702 +/* Define to 1 if you have the `_readdir64' function. */
1703 +/* #undef HAVE__READDIR64 */
1704 +
1705 +/* Define to 1 if you have the `_seekdir' function. */
1706 +/* #undef HAVE__SEEKDIR */
1707 +
1708 +/* Define to 1 if you have the `_stat' function. */
1709 +/* #undef HAVE__STAT */
1710 +
1711 +/* Define to 1 if you have the `_stat64' function. */
1712 +/* #undef HAVE__STAT64 */
1713 +
1714 +/* Define to 1 if you have the `_telldir' function. */
1715 +/* #undef HAVE__TELLDIR */
1716 +
1717 +/* Define to 1 if you have the `_write' function. */
1718 +/* #undef HAVE__WRITE */
1719 +
1720 +/* Define to 1 if you have the `__acl' function. */
1721 +/* #undef HAVE___ACL */
1722 +
1723 +/* Define to 1 if you have the `__chdir' function. */
1724 +/* #undef HAVE___CHDIR */
1725 +
1726 +/* Define to 1 if you have the `__close' function. */
1727 +#define HAVE___CLOSE 1
1728 +
1729 +/* Define to 1 if you have the `__closedir' function. */
1730 +/* #undef HAVE___CLOSEDIR */
1731 +
1732 +/* Define to 1 if you have the `__dup' function. */
1733 +/* #undef HAVE___DUP */
1734 +
1735 +/* Define to 1 if you have the `__dup2' function. */
1736 +#define HAVE___DUP2 1
1737 +
1738 +/* Define to 1 if you have the `__facl' function. */
1739 +/* #undef HAVE___FACL */
1740 +
1741 +/* Define to 1 if you have the `__fchdir' function. */
1742 +/* #undef HAVE___FCHDIR */
1743 +
1744 +/* Define to 1 if you have the `__fcntl' function. */
1745 +#define HAVE___FCNTL 1
1746 +
1747 +/* Define to 1 if you have the `__fork' function. */
1748 +#define HAVE___FORK 1
1749 +
1750 +/* Define to 1 if you have the `__fstat' function. */
1751 +#define HAVE___FSTAT 1
1752 +
1753 +/* Define to 1 if you have the `__fstat64' function. */
1754 +/* #undef HAVE___FSTAT64 */
1755 +
1756 +/* Define to 1 if you have the `__fxstat' function. */
1757 +#define HAVE___FXSTAT 1
1758 +
1759 +/* Define to 1 if you have the `__getcwd' function. */
1760 +/* #undef HAVE___GETCWD */
1761 +
1762 +/* Define to 1 if you have the `__getdents' function. */
1763 +/* #undef HAVE___GETDENTS */
1764 +
1765 +/* Define to 1 if you have the `__llseek' function. */
1766 +/* #undef HAVE___LLSEEK */
1767 +
1768 +/* Define to 1 if you have the `__lseek' function. */
1769 +#define HAVE___LSEEK 1
1770 +
1771 +/* Define to 1 if you have the `__lstat' function. */
1772 +#define HAVE___LSTAT 1
1773 +
1774 +/* Define to 1 if you have the `__lstat64' function. */
1775 +/* #undef HAVE___LSTAT64 */
1776 +
1777 +/* Define to 1 if you have the `__lxstat' function. */
1778 +#define HAVE___LXSTAT 1
1779 +
1780 +/* Define to 1 if you have the `__open' function. */
1781 +#define HAVE___OPEN 1
1782 +
1783 +/* Define to 1 if you have the `__open64' function. */
1784 +/* AR7 #define HAVE___OPEN64 1 */
1785 +
1786 +/* Define to 1 if you have the `__opendir' function. */
1787 +/* #undef HAVE___OPENDIR */
1788 +
1789 +/* Define to 1 if you have the `__pread' function. */
1790 +/* #undef HAVE___PREAD */
1791 +
1792 +/* Define to 1 if you have the `__pread64' function. */
1793 +/* AR7 #define HAVE___PREAD64 1 */
1794 +
1795 +/* Define to 1 if you have the `__pwrite' function. */
1796 +/* #undef HAVE___PWRITE */
1797 +
1798 +/* Define to 1 if you have the `__pwrite64' function. */
1799 +/* AR7 #define HAVE___PWRITE64 1 */
1800 +
1801 +/* Define to 1 if you have the `__read' function. */
1802 +#define HAVE___READ 1
1803 +
1804 +/* Define to 1 if you have the `__readdir' function. */
1805 +/* #undef HAVE___READDIR */
1806 +
1807 +/* Define to 1 if you have the `__readdir64' function. */
1808 +/* #undef HAVE___READDIR64 */
1809 +
1810 +/* Define to 1 if you have the `__seekdir' function. */
1811 +/* #undef HAVE___SEEKDIR */
1812 +
1813 +/* Define to 1 if you have the `__stat' function. */
1814 +#define HAVE___STAT 1
1815 +
1816 +/* Define to 1 if you have the `__stat64' function. */
1817 +/* #undef HAVE___STAT64 */
1818 +
1819 +/* Define to 1 if you have the `__sys_llseek' function. */
1820 +/* #undef HAVE___SYS_LLSEEK */
1821 +
1822 +/* Define to 1 if you have the `__telldir' function. */
1823 +/* #undef HAVE___TELLDIR */
1824 +
1825 +/* Whether __va_copy() is available */
1826 +/* #undef HAVE___VA_COPY */
1827 +
1828 +/* Define to 1 if you have the `__write' function. */
1829 +#define HAVE___WRITE 1
1830 +
1831 +/* Define to 1 if you have the `__xstat' function. */
1832 +#define HAVE___XSTAT 1
1833 +
1834 +/* Whether the host os is HPUX */
1835 +/* #undef HPUX */
1836 +
1837 +/* Whether the hpux sendfile() API is available */
1838 +/* #undef HPUX_SENDFILE_API */
1839 +
1840 +/* Whether to use intel spinlocks */
1841 +/* #undef INTEL_SPINLOCKS */
1842 +
1843 +/* Whether the host os is irix */
1844 +/* #undef IRIX */
1845 +
1846 +/* Whether the host os is irix6 */
1847 +/* #undef IRIX6 */
1848 +
1849 +/* Whether krb5_princ_realm returns krb5_realm or krb5_data */
1850 +/* #undef KRB5_PRINC_REALM_RETURNS_REALM */
1851 +
1852 +/* Number of arguments to ldap_set_rebind_proc */
1853 +/* #undef LDAP_SET_REBIND_PROC_ARGS */
1854 +
1855 +/* Whether the host os is linux */
1856 +#define LINUX 1
1857 +
1858 +/* Whether (linux) sendfile() is broken */
1859 +/* #undef LINUX_BROKEN_SENDFILE_API */
1860 +
1861 +/* Whether linux sendfile() API is available */
1862 +#define LINUX_SENDFILE_API 1
1863 +
1864 +/* Whether to use mips spinlocks */
1865 +/* #undef MIPS_SPINLOCKS */
1866 +
1867 +/* Whether MMAP is broken */
1868 +/* #undef MMAP_BLACKLIST */
1869 +
1870 +/* Whether the host os is NeXT v2 */
1871 +/* #undef NEXT2 */
1872 +
1873 +/* Define to 1 if your C compiler doesn't accept -c and -o together. */
1874 +/* #undef NO_MINUS_C_MINUS_O */
1875 +
1876 +/* Whether the host os is osf1 */
1877 +/* #undef OSF1 */
1878 +
1879 +/* Define to the address where bug reports for this package should be sent. */
1880 +#define PACKAGE_BUGREPORT ""
1881 +
1882 +/* Define to the full name of this package. */
1883 +#define PACKAGE_NAME ""
1884 +
1885 +/* Define to the full name and version of this package. */
1886 +#define PACKAGE_STRING ""
1887 +
1888 +/* Define to the one symbol short name of this package. */
1889 +#define PACKAGE_TARNAME ""
1890 +
1891 +/* Define to the version of this package. */
1892 +#define PACKAGE_VERSION ""
1893 +
1894 +/* Does a POSIX ACL need a mask element */
1895 +/* #undef POSIX_ACL_NEEDS_MASK */
1896 +
1897 +/* Whether to use powerpc spinlocks */
1898 +/* #undef POWERPC_SPINLOCKS */
1899 +
1900 +/* Whether pututline returns pointer */
1901 +#define PUTUTLINE_RETURNS_UTMP 1
1902 +
1903 +/* Whether the host os is qnx */
1904 +/* #undef QNX */
1905 +
1906 +/* Whether the realpath function allows NULL */
1907 +#define REALPATH_TAKES_NULL 1
1908 +
1909 +/* Whether the host os is reliantunix */
1910 +/* #undef RELIANTUNIX */
1911 +
1912 +/* Whether getpass should be replaced */
1913 +#define REPLACE_GETPASS 1
1914 +
1915 +/* Whether inet_ntoa should be replaced */
1916 +/* #undef REPLACE_INET_NTOA */
1917 +
1918 +/* Define as the return type of signal handlers (`int' or `void'). */
1919 +#define RETSIGTYPE void
1920 +
1921 +/* Whether the host os is sco unix */
1922 +/* #undef SCO */
1923 +
1924 +/* Whether seekdir returns void */
1925 +#define SEEKDIR_RETURNS_VOID 1
1926 +
1927 +/* The size of the 'ino_t' type */
1928 +/* AR7 #define SIZEOF_INO_T 8 */
1929 +#define SIZEOF_INO_T 4 /* AR7 */
1930 +
1931 +/* The size of a `int', as computed by sizeof. */
1932 +#define SIZEOF_INT 4
1933 +
1934 +/* The size of a `long', as computed by sizeof. */
1935 +#define SIZEOF_LONG 4
1936 +
1937 +/* The size of the 'off_t' type */
1938 +/* AR7 #define SIZEOF_OFF_T 8 */
1939 +#define SIZEOF_OFF_T 4 /* AR7 */
1940 +
1941 +/* The size of a `short', as computed by sizeof. */
1942 +#define SIZEOF_SHORT 2
1943 +
1944 +/* Use socket wrapper library */
1945 +/* #undef SOCKET_WRAPPER */
1946 +
1947 +/* Whether the solaris sendfile() API is available */
1948 +/* #undef SOLARIS_SENDFILE_API */
1949 +
1950 +/* Whether to use sparc spinlocks */
1951 +/* #undef SPARC_SPINLOCKS */
1952 +
1953 +/* Whether statfs requires two arguments and struct statfs has bsize property
1954 + */
1955 +/* #undef STAT_STATFS2_BSIZE */
1956 +
1957 +/* Whether statfs requires 2 arguments and struct statfs has fsize */
1958 +/* #undef STAT_STATFS2_FSIZE */
1959 +
1960 +/* Whether statfs requires 2 arguments and struct fs_data is available */
1961 +/* #undef STAT_STATFS2_FS_DATA */
1962 +
1963 +/* Whether statfs requires 3 arguments */
1964 +/* #undef STAT_STATFS3_OSF1 */
1965 +
1966 +/* Whether statfs requires 4 arguments */
1967 +/* #undef STAT_STATFS4 */
1968 +
1969 +/* Whether statvfs() is available */
1970 +#define STAT_STATVFS 1 /* AR7 */
1971 +
1972 +/* Whether statvfs64() is available */
1973 +/* AR7 #define STAT_STATVFS64 1 */
1974 +
1975 +/* The size of a block */
1976 +#define STAT_ST_BLOCKSIZE 512
1977 +
1978 +/* Define to 1 if you have the ANSI C header files. */
1979 +#define STDC_HEADERS 1
1980 +
1981 +/* String list of builtin modules */
1982 +#define STRING_STATIC_MODULES " pdb_smbpasswd pdb_tdbsam pdb_guest rpc_lsa rpc_reg rpc_lsa_ds rpc_wks rpc_svcctl rpc_net rpc_dfs rpc_srv rpc_spoolss rpc_eventlog rpc_samr idmap_tdb auth_rhosts auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin"
1983 +
1984 +/* Whether the host os is sunos4 */
1985 +/* #undef SUNOS4 */
1986 +
1987 +/* Whether the host os is solaris */
1988 +/* #undef SUNOS5 */
1989 +
1990 +/* Whether sysconf(_SC_NGROUPS_MAX) is available */
1991 +#define SYSCONF_SC_NGROUPS_MAX 1
1992 +
1993 +/* Whether sysconf(_SC_NPROC_ONLN) is available */
1994 +/* #undef SYSCONF_SC_NPROC_ONLN */
1995 +
1996 +/* Whether this is a system V system */
1997 +/* #undef SYSV */
1998 +
1999 +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
2000 +#define TIME_WITH_SYS_TIME 1
2001 +
2002 +/* Whether the host os is unixware */
2003 +/* #undef UNIXWARE */
2004 +
2005 +/* Whether to use both of HPUX' crypt calls */
2006 +/* #undef USE_BOTH_CRYPT_CALLS */
2007 +
2008 +/* Whether seteuid() is available */
2009 +/* #undef USE_SETEUID */
2010 +
2011 +/* Whether setresuid() is available */
2012 +#define USE_SETRESUID 1
2013 +
2014 +/* Whether setreuid() is available */
2015 +/* #undef USE_SETREUID */
2016 +
2017 +/* Whether setuidx() is available */
2018 +/* #undef USE_SETUIDX */
2019 +
2020 +/* Whether to use spin locks instead of fcntl locks */
2021 +/* #undef USE_SPINLOCKS */
2022 +
2023 +/* Whether to include Active Directory support */
2024 +/* #undef WITH_ADS */
2025 +
2026 +/* Whether to include AFS clear-text auth support */
2027 +/* #undef WITH_AFS */
2028 +
2029 +/* Using asynchronous io */
2030 +/* #undef WITH_AIO */
2031 +
2032 +/* Whether to include automount support */
2033 +/* #undef WITH_AUTOMOUNT */
2034 +
2035 +/* Whether to include DFS support */
2036 +/* #undef WITH_DFS */
2037 +
2038 +/* Whether to include AFS fake-kaserver support */
2039 +/* #undef WITH_FAKE_KASERVER */
2040 +
2041 +/* Whether to include 2.2 compatible LDAP SAM configuration */
2042 +/* #undef WITH_LDAP_SAMCONFIG */
2043 +
2044 +/* Whether to include nisplus_home support */
2045 +/* #undef WITH_NISPLUS_HOME */
2046 +
2047 +/* Whether to include PAM support */
2048 +/* #undef WITH_PAM */
2049 +
2050 +/* Whether to use profiling */
2051 +/* #undef WITH_PROFILE */
2052 +
2053 +/* Whether to use disk quota support */
2054 +/* AR7 #define WITH_QUOTAS 1 */
2055 +
2056 +/* Whether to include sendfile() support */
2057 +#define WITH_SENDFILE 1
2058 +
2059 +/* Whether to build smbmount */
2060 +/* #undef WITH_SMBMOUNT */
2061 +
2062 +/* Whether to include smbwrapper support */
2063 +/* #undef WITH_SMBWRAPPER */
2064 +
2065 +/* Whether to include experimental syslog support */
2066 +/* #undef WITH_SYSLOG */
2067 +
2068 +/* Whether to include experimental utmp accounting */
2069 +#define WITH_UTMP 1
2070 +
2071 +/* Whether to build winbind */
2072 +#define WITH_WINBIND 1
2073 +
2074 +/* Define to 1 if your processor stores words with the most significant byte
2075 + first (like Motorola and SPARC, unlike Intel and VAX). */
2076 +/* #undef WORDS_BIGENDIAN */
2077 +
2078 +/* Required alignment */
2079 +/* #undef _ALIGNMENT_REQUIRED */
2080 +
2081 +/* File offset bits */
2082 +#ifdef WITH_LFS
2083 +#define _FILE_OFFSET_BITS 64 /* Large File Support */
2084 +#endif
2085 +
2086 +/* Whether to use GNU libc extensions */
2087 +#define _GNU_SOURCE 1
2088 +
2089 +/* Whether to use HPUX extensions */
2090 +/* #undef _HPUX_SOURCE */
2091 +
2092 +/* Whether to enable large file support */
2093 +/* AR7 #define _LARGEFILE64_SOURCE 1 */
2094 +
2095 +/* Whether to enable large file support */
2096 +/* #undef _LARGE_FILES */
2097 +
2098 +/* Maximum alignment */
2099 +/* #undef _MAX_ALIGNMENT */
2100 +
2101 +/* Whether to enable POSIX support */
2102 +/* #undef _POSIX_C_SOURCE */
2103 +
2104 +/* Whether to use POSIX compatible functions */
2105 +/* #undef _POSIX_SOURCE */
2106 +
2107 +/* Whether to enable System V compatibility */
2108 +/* #undef _SYSV */
2109 +
2110 +/* Define to 1 if type `char' is unsigned and you are not using gcc. */
2111 +#ifndef __CHAR_UNSIGNED__
2112 +/* # undef __CHAR_UNSIGNED__ */
2113 +#endif
2114 +
2115 +/* Whether to build auth_builtin as shared module */
2116 +/* #undef auth_builtin_init */
2117 +
2118 +/* Whether to build auth_domain as shared module */
2119 +/* #undef auth_domain_init */
2120 +
2121 +/* Whether to build auth_rhosts as shared module */
2122 +/* #undef auth_rhosts_init */
2123 +
2124 +/* Whether to build auth_sam as shared module */
2125 +/* #undef auth_sam_init */
2126 +
2127 +/* Whether to build auth_server as shared module */
2128 +/* #undef auth_server_init */
2129 +
2130 +/* Whether to build auth_unix as shared module */
2131 +/* #undef auth_unix_init */
2132 +
2133 +/* Whether to build auth_winbind as shared module */
2134 +/* #undef auth_winbind_init */
2135 +
2136 +/* Whether to build charset_CP437 as shared module */
2137 +#define charset_CP437_init init_module
2138 +
2139 +/* Whether to build charset_CP850 as shared module */
2140 +#define charset_CP850_init init_module
2141 +
2142 +/* Whether to build charset_macosxfs as shared module */
2143 +/* #undef charset_macosxfs_init */
2144 +
2145 +/* Whether to build charset_weird as shared module */
2146 +/* #undef charset_weird_init */
2147 +
2148 +/* Define to empty if `const' does not conform to ANSI C. */
2149 +/* #undef const */
2150 +
2151 +/* Define to `int' if <sys/types.h> doesn't define. */
2152 +/* #undef gid_t */
2153 +
2154 +/* Whether to build idmap_ad as shared module */
2155 +/* #undef idmap_ad_init */
2156 +
2157 +/* Whether to build idmap_ldap as shared module */
2158 +/* #undef idmap_ldap_init */
2159 +
2160 +/* Whether to build idmap_rid as shared module */
2161 +/* #undef idmap_rid_init */
2162 +
2163 +/* Whether to build idmap_tdb as shared module */
2164 +/* #undef idmap_tdb_init */
2165 +
2166 +/* Define to `__inline__' or `__inline' if that's what the C compiler
2167 + calls it, or to nothing if 'inline' is not supported under any name. */
2168 +#ifndef __cplusplus
2169 +/* #undef inline */
2170 +#endif
2171 +
2172 +/* Define to `unsigned' if <sys/types.h> does not define. */
2173 +/* #undef ino_t */
2174 +
2175 +/* Define to `off_t' if <sys/types.h> does not define. */
2176 +/* #undef loff_t */
2177 +
2178 +/* Define to `int' if <sys/types.h> does not define. */
2179 +/* #undef mode_t */
2180 +
2181 +/* Define to `long' if <sys/types.h> does not define. */
2182 +/* #undef off_t */
2183 +
2184 +/* Define to `loff_t' if <sys/types.h> does not define. */
2185 +#define offset_t loff_t
2186 +
2187 +/* Whether to build pdb_guest as shared module */
2188 +/* #undef pdb_guest_init */
2189 +
2190 +/* Whether to build pdb_ldap as shared module */
2191 +/* #undef pdb_ldap_init */
2192 +
2193 +/* Whether to build pdb_mysql as shared module */
2194 +/* #undef pdb_mysql_init */
2195 +
2196 +/* Whether to build pdb_pgsql as shared module */
2197 +/* #undef pdb_pgsql_init */
2198 +
2199 +/* Whether to build pdb_smbpasswd as shared module */
2200 +/* #undef pdb_smbpasswd_init */
2201 +
2202 +/* Whether to build pdb_tdbsam as shared module */
2203 +/* #undef pdb_tdbsam_init */
2204 +
2205 +/* Whether to build pdb_xml as shared module */
2206 +/* #undef pdb_xml_init */
2207 +
2208 +/* Define to `int' if <sys/types.h> does not define. */
2209 +/* #undef pid_t */
2210 +
2211 +/* Whether to build rpc_dfs as shared module */
2212 +/* #undef rpc_dfs_init */
2213 +
2214 +/* Whether to build rpc_echo as shared module */
2215 +/* #undef rpc_echo_init */
2216 +
2217 +/* Whether to build rpc_eventlog as shared module */
2218 +/* #undef rpc_eventlog_init */
2219 +
2220 +/* Whether to build rpc_lsa_ds as shared module */
2221 +/* #undef rpc_lsa_ds_init */
2222 +
2223 +/* Whether to build rpc_lsa as shared module */
2224 +/* #undef rpc_lsa_init */
2225 +
2226 +/* Whether to build rpc_net as shared module */
2227 +/* #undef rpc_net_init */
2228 +
2229 +/* Whether to build rpc_reg as shared module */
2230 +/* #undef rpc_reg_init */
2231 +
2232 +/* Whether to build rpc_samr as shared module */
2233 +/* #undef rpc_samr_init */
2234 +
2235 +/* Whether to build rpc_spoolss as shared module */
2236 +/* #undef rpc_spoolss_init */
2237 +
2238 +/* Whether to build rpc_srv as shared module */
2239 +/* #undef rpc_srv_init */
2240 +
2241 +/* Whether to build rpc_svcctl as shared module */
2242 +/* #undef rpc_svcctl_init */
2243 +
2244 +/* Whether to build rpc_wks as shared module */
2245 +/* #undef rpc_wks_init */
2246 +
2247 +/* Define to `unsigned' if <sys/types.h> does not define. */
2248 +/* #undef size_t */
2249 +
2250 +/* Define to `int' if <sys/types.h> does not define. */
2251 +/* #undef ssize_t */
2252 +
2253 +/* Static init functions */
2254 +/* AR7 #define static_init_auth { auth_rhosts_init(); auth_sam_init(); auth_unix_init(); auth_winbind_init(); auth_server_init(); auth_domain_init(); auth_builtin_init();} */
2255 +#define static_init_auth { auth_sam_init(); auth_builtin_init();}
2256 +
2257 +/* Static init functions */
2258 +#define static_init_charset {}
2259 +
2260 +/* Static init functions */
2261 +#define static_init_idmap { idmap_tdb_init();}
2262 +
2263 +/* Static init functions */
2264 +#define static_init_pdb { pdb_smbpasswd_init(); pdb_tdbsam_init(); /* pdb_guest_init(); */}
2265 +
2266 +/* Static init functions */
2267 +/* AR7 #define static_init_rpc { rpc_lsa_init(); rpc_reg_init(); rpc_lsa_ds_init(); rpc_wks_init(); rpc_svcctl_init(); rpc_net_init(); rpc_dfs_init(); rpc_srv_init(); rpc_spoolss_init(); rpc_eventlog_init(); rpc_samr_init();} */
2268 +#define static_init_rpc { rpc_lsa_init(); /* rpc_reg_init();*/ rpc_lsa_ds_init(); rpc_wks_init(); /* rpc_svcctl_init(); */ rpc_net_init(); rpc_dfs_init(); /* rpc_srv_init(); */ /* rpc_eventlog_init(); */ /* rpc_samr_init(); */}
2269 +
2270 +/* Static init functions */
2271 +#define static_init_vfs {}
2272 +
2273 +/* Define to `int' if <sys/types.h> doesn't define. */
2274 +/* #undef uid_t */
2275 +
2276 +/* Whether to build vfs_afsacl as shared module */
2277 +/* #undef vfs_afsacl_init */
2278 +
2279 +/* Whether to build vfs_audit as shared module */
2280 +#define vfs_audit_init init_module
2281 +
2282 +/* Whether to build vfs_cap as shared module */
2283 +#define vfs_cap_init init_module
2284 +
2285 +/* Whether to build vfs_catia as shared module */
2286 +/* #undef vfs_catia_init */
2287 +
2288 +/* Whether to build vfs_default_quota as shared module */
2289 +#define vfs_default_quota_init init_module
2290 +
2291 +/* Whether to build vfs_expand_msdfs as shared module */
2292 +#define vfs_expand_msdfs_init init_module
2293 +
2294 +/* Whether to build vfs_extd_audit as shared module */
2295 +#define vfs_extd_audit_init init_module
2296 +
2297 +/* Whether to build vfs_fake_perms as shared module */
2298 +#define vfs_fake_perms_init init_module
2299 +
2300 +/* Whether to build vfs_full_audit as shared module */
2301 +#define vfs_full_audit_init init_module
2302 +
2303 +/* Whether to build vfs_netatalk as shared module */
2304 +#define vfs_netatalk_init init_module
2305 +
2306 +/* Whether to build vfs_readonly as shared module */
2307 +#define vfs_readonly_init init_module
2308 +
2309 +/* Whether to build vfs_recycle as shared module */
2310 +#define vfs_recycle_init init_module
2311 +
2312 +/* Whether to build vfs_shadow_copy as shared module */
2313 +#define vfs_shadow_copy_init init_module
2314 +
2315 +/* Define to `unsigned short' if <sys/types.h> does not define. */
2316 +/* #undef wchar_t */
2317 diff -urN samba-3.0.24.orig/source/include/debug.h samba-3.0.24/source/include/debug.h
2318 --- samba-3.0.24.orig/source/include/debug.h 2006-04-20 04:29:39.000000000 +0200
2319 +++ samba-3.0.24/source/include/debug.h 2007-08-07 09:38:18.000000000 +0200
2320 @@ -162,6 +162,26 @@
2321 * will remove the extra conditional test.
2322 */
2323
2324 +#if 1 /* AR7 */
2325 +
2326 +#define DEBUGLVL( level ) (0)
2327 +#define DEBUGLVLC( dbgc_class, level ) (0)
2328 +#ifndef SAMBA_DEBUG
2329 +#define DEBUG( level, body ) (0)
2330 +#define Log(x) (0)
2331 +#else
2332 +void _fDebug(char *fmt, ...);
2333 +#define DEBUG( level, body ) _fDebug body
2334 +#define Log(x) _fLog x
2335 +void _fLog(char *fmt, ...);
2336 +#endif
2337 +
2338 +#define DEBUGC( dbgc_class, level, body ) (0)
2339 +#define DEBUGADD( level, body ) (0)
2340 +#define DEBUGADDC( dbgc_class, level, body ) (0)
2341 +
2342 +#else
2343 +
2344 #define DEBUGLVL( level ) \
2345 ( ((level) <= MAX_DEBUG_LEVEL) && \
2346 ((DEBUGLEVEL_CLASS[ DBGC_CLASS ] >= (level))|| \
2347 @@ -208,8 +228,13 @@
2348 DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) ) \
2349 && (dbgtext body) )
2350
2351 +#endif /* AR7 */
2352 +
2353 +
2354 /* Print a separator to the debug log. */
2355 #define DEBUGSEP(level)\
2356 DEBUG((level),("===============================================================\n"))
2357
2358 +
2359 +
2360 #endif
2361 diff -urN samba-3.0.24.orig/source/include/local.h samba-3.0.24/source/include/local.h
2362 --- samba-3.0.24.orig/source/include/local.h 2006-04-20 04:29:39.000000000 +0200
2363 +++ samba-3.0.24/source/include/local.h 2007-07-17 13:19:05.000000000 +0200
2364 @@ -16,7 +16,8 @@
2365 only important messages. This gives *much* smaller binaries
2366 */
2367 #ifndef MAX_DEBUG_LEVEL
2368 -#define MAX_DEBUG_LEVEL 1000
2369 +/* AR7 #define MAX_DEBUG_LEVEL 1000 */
2370 +#define MAX_DEBUG_LEVEL 0
2371 #endif
2372
2373 /* This defines the section name in the configuration file that will contain */
2374 @@ -49,7 +50,8 @@
2375 #define MAX_DIRECTORY_HANDLES 2048
2376
2377 /* maximum number of file caches per smbd */
2378 -#define MAX_WRITE_CACHES 10
2379 +/* #define MAX_WRITE_CACHES 10 */
2380 +#define MAX_WRITE_CACHES 2 /* AVM */
2381
2382 /* define what facility to use for syslog */
2383 #ifndef SYSLOG_FACILITY
2384 diff -urN samba-3.0.24.orig/source/include/smb.h samba-3.0.24/source/include/smb.h
2385 --- samba-3.0.24.orig/source/include/smb.h 2007-02-04 19:59:23.000000000 +0100
2386 +++ samba-3.0.24/source/include/smb.h 2007-08-07 09:38:18.000000000 +0200
2387 @@ -1436,6 +1436,7 @@
2388 #define FLAGS2_LONG_PATH_COMPONENTS 0x0001
2389 #define FLAGS2_EXTENDED_ATTRIBUTES 0x0002
2390 #define FLAGS2_SMB_SECURITY_SIGNATURES 0x0004
2391 +#define FLAGS2_UNKNOWN_BIT4 0x0010
2392 #define FLAGS2_IS_LONG_NAME 0x0040
2393 #define FLAGS2_EXTENDED_SECURITY 0x0800
2394 #define FLAGS2_DFS_PATHNAMES 0x1000
2395 @@ -1499,7 +1500,8 @@
2396
2397 /* Remote architectures we know about. */
2398 enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT,
2399 - RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_SAMBA, RA_CIFSFS};
2400 + RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_VISTA,
2401 + RA_SAMBA, RA_CIFSFS};
2402
2403 /* case handling */
2404 enum case_handling {CASE_LOWER,CASE_UPPER};
2405 diff -urN samba-3.0.24.orig/source/include/smb_macros.h samba-3.0.24/source/include/smb_macros.h
2406 --- samba-3.0.24.orig/source/include/smb_macros.h 2006-04-20 04:29:39.000000000 +0200
2407 +++ samba-3.0.24/source/include/smb_macros.h 2007-08-07 09:38:18.000000000 +0200
2408 @@ -310,7 +310,6 @@
2409 #if defined(PARANOID_MALLOC_CHECKER)
2410
2411 #define PRS_ALLOC_MEM(ps, type, count) (type *)prs_alloc_mem_((ps),sizeof(type),(count))
2412 -#define PRS_ALLOC_MEM_VOID(ps, size) prs_alloc_mem_((ps),(size),1)
2413
2414 /* Get medieval on our ass about malloc.... */
2415
2416 @@ -354,7 +353,6 @@
2417 #define __location__ __FILE__ ":" __LINESTR__
2418
2419 #define PRS_ALLOC_MEM(ps, type, count) (type *)prs_alloc_mem((ps),sizeof(type),(count))
2420 -#define PRS_ALLOC_MEM_VOID(ps, size) prs_alloc_mem((ps),(size),1)
2421
2422 /* Regular malloc code. */
2423
2424 diff -urN samba-3.0.24.orig/source/lib/dummysmbd.c samba-3.0.24/source/lib/dummysmbd.c
2425 --- samba-3.0.24.orig/source/lib/dummysmbd.c 2006-04-20 04:29:23.000000000 +0200
2426 +++ samba-3.0.24/source/lib/dummysmbd.c 2007-08-07 09:38:18.000000000 +0200
2427 @@ -38,3 +38,9 @@
2428 {
2429 return False;
2430 }
2431 +
2432 +NTSTATUS can_delete_directory(struct connection_struct *conn,
2433 + const char *dirname)
2434 +{
2435 + return NT_STATUS_OK;
2436 +}
2437 diff -urN samba-3.0.24.orig/source/lib/fsusage.c samba-3.0.24/source/lib/fsusage.c
2438 --- samba-3.0.24.orig/source/lib/fsusage.c 2005-02-25 18:59:32.000000000 +0100
2439 +++ samba-3.0.24/source/lib/fsusage.c 2007-07-17 13:19:05.000000000 +0200
2440 @@ -51,6 +51,8 @@
2441 #define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)fsd.f_fsize, (SMB_BIG_UINT)512)
2442 struct statfs fsd;
2443
2444 +
2445 +// #error STAT_STATFS3_OSF1
2446 if (statfs (path, &fsd, sizeof (struct statfs)) != 0)
2447 return -1;
2448 #endif /* STAT_STATFS3_OSF1 */
2449 @@ -59,6 +61,7 @@
2450 #define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)1024, (SMB_BIG_UINT)512)
2451 struct fs_data fsd;
2452
2453 +// #error STAT_STATFS2_FS_DATA
2454 if (statfs (path, &fsd) != 1)
2455 return -1;
2456
2457 @@ -70,6 +73,7 @@
2458 #define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)fsd.f_bsize, (SMB_BIG_UINT)512)
2459 struct statfs fsd;
2460
2461 +// #error STAT_STATFS2_FS_BSIZE
2462 if (statfs (path, &fsd) < 0)
2463 return -1;
2464
2465 @@ -93,6 +97,7 @@
2466
2467 struct statfs fsd;
2468
2469 +// #error STAT_STATFS2_FSIZE
2470 if (statfs (path, &fsd) < 0)
2471 return -1;
2472 #endif /* STAT_STATFS2_FSIZE */
2473 @@ -114,6 +119,7 @@
2474
2475 struct statfs fsd;
2476
2477 +// #error STAT_STATFS4
2478 if (statfs (path, &fsd, sizeof fsd, 0) < 0)
2479 return -1;
2480 /* Empirically, the block counts on most SVR3 and SVR3-derived
2481 @@ -127,9 +133,11 @@
2482 adjust_blocks ((SMB_BIG_UINT)(B), fsd.f_frsize ? (SMB_BIG_UINT)fsd.f_frsize : (SMB_BIG_UINT)fsd.f_bsize, (SMB_BIG_UINT)512)
2483
2484 #ifdef STAT_STATVFS64
2485 +// #error STAT_STATVFS64
2486 struct statvfs64 fsd;
2487 if (statvfs64(path, &fsd) < 0) return -1;
2488 #else
2489 +// #error STAT_STATVFS
2490 struct statvfs fsd;
2491 if (statvfs(path, &fsd) < 0) return -1;
2492 #endif
2493 @@ -139,6 +147,7 @@
2494 #endif /* STAT_STATVFS */
2495
2496 #ifndef CONVERT_BLOCKS
2497 +#error no STAT_STATxxx defined - we have no dfree code!
2498 /* we don't have any dfree code! */
2499 return -1;
2500 #else
2501 diff -urN samba-3.0.24.orig/source/lib/iconv.c samba-3.0.24/source/lib/iconv.c
2502 --- samba-3.0.24.orig/source/lib/iconv.c 2007-02-04 19:59:17.000000000 +0100
2503 +++ samba-3.0.24/source/lib/iconv.c 2007-07-17 13:19:05.000000000 +0200
2504 @@ -388,7 +388,10 @@
2505
2506 while (*inbytesleft >= 2 && *outbytesleft >= 1) {
2507 (*outbuf)[0] = (*inbuf)[0];
2508 - if ((*inbuf)[1]) ir_count++;
2509 + if ((*inbuf)[1]) {
2510 + ir_count++;
2511 + (*outbuf)[0] = '_'; // AR7
2512 + }
2513 (*inbytesleft) -= 2;
2514 (*outbytesleft) -= 1;
2515 (*inbuf) += 2;
2516 diff -urN samba-3.0.24.orig/source/lib/pidfile.c samba-3.0.24/source/lib/pidfile.c
2517 --- samba-3.0.24.orig/source/lib/pidfile.c 2007-02-04 19:59:17.000000000 +0100
2518 +++ samba-3.0.24/source/lib/pidfile.c 2007-07-17 13:19:05.000000000 +0200
2519 @@ -82,19 +82,20 @@
2520 {
2521 int fd;
2522 char buf[20];
2523 - char *short_configfile;
2524 pstring name;
2525 pstring pidFile;
2526 pid_t pid;
2527
2528 +#if 0 /* AVM */
2529 /* Add a suffix to the program name if this is a process with a
2530 * none default configuration file name. */
2531 if (strcmp( CONFIGFILE, dyn_CONFIGFILE) == 0) {
2532 strncpy( name, program_name, sizeof( name)-1);
2533 } else {
2534 - short_configfile = strrchr( dyn_CONFIGFILE, '/');
2535 + char *short_configfile = strrchr( dyn_CONFIGFILE, '/');
2536 slprintf( name, sizeof( name)-1, "%s-%s", program_name, short_configfile+1);
2537 }
2538 +#endif
2539
2540 slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name);
2541
2542 diff -urN samba-3.0.24.orig/source/lib/smbrun.c samba-3.0.24/source/lib/smbrun.c
2543 --- samba-3.0.24.orig/source/lib/smbrun.c 2006-04-20 04:29:23.000000000 +0200
2544 +++ samba-3.0.24/source/lib/smbrun.c 2007-08-07 09:38:18.000000000 +0200
2545 @@ -55,7 +55,7 @@
2546 outfd (or discard it if outfd is NULL).
2547 ****************************************************************************/
2548
2549 -int smbrun(const char *cmd, int *outfd)
2550 +static int smbrun_internal(const char *cmd, int *outfd, BOOL sanitize)
2551 {
2552 pid_t pid;
2553 uid_t uid = current_user.ut.uid;
2554 @@ -173,13 +173,36 @@
2555 }
2556 #endif
2557
2558 - execl("/bin/sh","sh","-c",cmd,NULL);
2559 + {
2560 + const char *newcmd = sanitize ? escape_shell_string(cmd) : cmd;
2561 + if (!newcmd) {
2562 + exit(82);
2563 + }
2564 + execl("/bin/sh","sh","-c",newcmd,NULL);
2565 + }
2566
2567 /* not reached */
2568 - exit(82);
2569 + exit(83);
2570 return 1;
2571 }
2572
2573 +/****************************************************************************
2574 + Use only in known safe shell calls (printing).
2575 +****************************************************************************/
2576 +
2577 +int smbrun_no_sanitize(const char *cmd, int *outfd)
2578 +{
2579 + return smbrun_internal(cmd, outfd, False);
2580 +}
2581 +
2582 +/****************************************************************************
2583 + By default this now sanitizes shell expansion.
2584 +****************************************************************************/
2585 +
2586 +int smbrun(const char *cmd, int *outfd)
2587 +{
2588 + return smbrun_internal(cmd, outfd, True);
2589 +}
2590
2591 /****************************************************************************
2592 run a command being careful about uid/gid handling and putting the output in
2593 @@ -302,7 +325,7 @@
2594 #endif
2595
2596 execl("/bin/sh", "sh", "-c", cmd, NULL);
2597 -
2598 +
2599 /* not reached */
2600 exit(82);
2601 return 1;
2602 diff -urN samba-3.0.24.orig/source/lib/util.c samba-3.0.24/source/lib/util.c
2603 --- samba-3.0.24.orig/source/lib/util.c 2007-02-04 19:59:17.000000000 +0100
2604 +++ samba-3.0.24/source/lib/util.c 2007-08-07 09:38:18.000000000 +0200
2605 @@ -300,7 +300,11 @@
2606 char *p;
2607 if ((p = getenv("TMPDIR")))
2608 return p;
2609 +#if 1 /* AR7 */
2610 + return "/var/tmp";
2611 +#else
2612 return "/tmp";
2613 +#endif
2614 }
2615
2616 /****************************************************************************
2617 @@ -2182,6 +2186,9 @@
2618 case RA_WIN2K3:
2619 fstrcpy(remote_arch, "Win2K3");
2620 break;
2621 + case RA_VISTA:
2622 + fstrcpy(remote_arch, "Vista");
2623 + break;
2624 case RA_SAMBA:
2625 fstrcpy(remote_arch,"Samba");
2626 break;
2627 diff -urN samba-3.0.24.orig/source/lib/util_sec.c samba-3.0.24/source/lib/util_sec.c
2628 --- samba-3.0.24.orig/source/lib/util_sec.c 2007-02-04 19:59:17.000000000 +0100
2629 +++ samba-3.0.24/source/lib/util_sec.c 2007-08-07 09:38:18.000000000 +0200
2630 @@ -286,28 +286,6 @@
2631 }
2632
2633 /****************************************************************************
2634 - Lightweight become root - no group change.
2635 -****************************************************************************/
2636 -
2637 -void become_root_uid_only(void)
2638 -{
2639 - save_re_uid();
2640 - set_effective_uid(0);
2641 -}
2642 -
2643 -/****************************************************************************
2644 - Lightweight unbecome root - no group change. Expects we are root already,
2645 - saves errno across call boundary.
2646 -****************************************************************************/
2647 -
2648 -void unbecome_root_uid_only(void)
2649 -{
2650 - int saved_errno = errno;
2651 - restore_re_uid_fromroot();
2652 - errno = saved_errno;
2653 -}
2654 -
2655 -/****************************************************************************
2656 save the real and effective gid for later restoration. Used by the
2657 getgroups code
2658 ****************************************************************************/
2659 diff -urN samba-3.0.24.orig/source/lib/util_str.c samba-3.0.24/source/lib/util_str.c
2660 --- samba-3.0.24.orig/source/lib/util_str.c 2007-02-04 19:59:17.000000000 +0100
2661 +++ samba-3.0.24/source/lib/util_str.c 2007-08-07 09:38:18.000000000 +0200
2662 @@ -680,14 +680,14 @@
2663
2664 for(i = 0; i < len; i++) {
2665 int val = (src[i] & 0xff);
2666 - if (isupper_ascii(val) || islower_ascii(val) || isdigit(val) || strchr_m(other_safe_chars, val))
2667 + if (isupper_ascii(val) || islower_ascii(val) || isdigit(val) || strchr_m(other_safe_chars, val)) {
2668 dest[i] = src[i];
2669 - else
2670 + } else {
2671 dest[i] = '_';
2672 + }
2673 }
2674
2675 dest[i] = '\0';
2676 -
2677 return dest;
2678 }
2679
2680 @@ -2426,3 +2426,165 @@
2681 return True;
2682 }
2683
2684 +
2685 +/*******************************************************************
2686 + Add a shell escape character '\' to any character not in a known list
2687 + of characters. UNIX charset format.
2688 +*******************************************************************/
2689 +
2690 +#define INCLUDE_LIST "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_/ \t.,"
2691 +#define INSIDE_DQUOTE_LIST "$`\n\"\\"
2692 +
2693 +char *escape_shell_string(const char *src)
2694 +{
2695 + size_t srclen = strlen(src);
2696 + char *ret = SMB_MALLOC((srclen * 2) + 1);
2697 + char *dest = ret;
2698 + BOOL in_s_quote = False;
2699 + BOOL in_d_quote = False;
2700 + BOOL next_escaped = False;
2701 +
2702 + if (!ret) {
2703 + return NULL;
2704 + }
2705 +
2706 + while (*src) {
2707 + size_t c_size = next_mb_char_size(src);
2708 +
2709 + if (c_size == (size_t)-1) {
2710 + SAFE_FREE(ret);
2711 + return NULL;
2712 + }
2713 +
2714 + if (c_size > 1) {
2715 + memcpy(dest, src, c_size);
2716 + src += c_size;
2717 + dest += c_size;
2718 + next_escaped = False;
2719 + continue;
2720 + }
2721 +
2722 + /*
2723 + * Deal with backslash escaped state.
2724 + * This only lasts for one character.
2725 + */
2726 +
2727 + if (next_escaped) {
2728 + *dest++ = *src++;
2729 + next_escaped = False;
2730 + continue;
2731 + }
2732 +
2733 + /*
2734 + * Deal with single quote state. The
2735 + * only thing we care about is exiting
2736 + * this state.
2737 + */
2738 +
2739 + if (in_s_quote) {
2740 + if (*src == '\'') {
2741 + in_s_quote = False;
2742 + }
2743 + *dest++ = *src++;
2744 + continue;
2745 + }
2746 +
2747 + /*
2748 + * Deal with double quote state. The most
2749 + * complex state. We must cope with \, meaning
2750 + * possibly escape next char (depending what it
2751 + * is), ", meaning exit this state, and possibly
2752 + * add an \ escape to any unprotected character
2753 + * (listed in INSIDE_DQUOTE_LIST).
2754 + */
2755 +
2756 + if (in_d_quote) {
2757 + if (*src == '\\') {
2758 + /*
2759 + * Next character might be escaped.
2760 + * We have to peek. Inside double
2761 + * quotes only INSIDE_DQUOTE_LIST
2762 + * characters are escaped by a \.
2763 + */
2764 +
2765 + char nextchar;
2766 +
2767 + c_size = next_mb_char_size(&src[1]);
2768 + if (c_size == (size_t)-1) {
2769 + SAFE_FREE(ret);
2770 + return NULL;
2771 + }
2772 + if (c_size > 1) {
2773 + /*
2774 + * Don't escape the next char.
2775 + * Just copy the \.
2776 + */
2777 + *dest++ = *src++;
2778 + continue;
2779 + }
2780 +
2781 + nextchar = src[1];
2782 +
2783 + if (nextchar && strchr(INSIDE_DQUOTE_LIST, (int)nextchar)) {
2784 + next_escaped = True;
2785 + }
2786 + *dest++ = *src++;
2787 + continue;
2788 + }
2789 +
2790 + if (*src == '\"') {
2791 + /* Exit double quote state. */
2792 + in_d_quote = False;
2793 + *dest++ = *src++;
2794 + continue;
2795 + }
2796 +
2797 + /*
2798 + * We know the character isn't \ or ",
2799 + * so escape it if it's any of the other
2800 + * possible unprotected characters.
2801 + */
2802 +
2803 + if (strchr(INSIDE_DQUOTE_LIST, (int)*src)) {
2804 + *dest++ = '\\';
2805 + }
2806 + *dest++ = *src++;
2807 + continue;
2808 + }
2809 +
2810 + /*
2811 + * From here to the end of the loop we're
2812 + * not in the single or double quote state.
2813 + */
2814 +
2815 + if (*src == '\\') {
2816 + /* Next character must be escaped. */
2817 + next_escaped = True;
2818 + *dest++ = *src++;
2819 + continue;
2820 + }
2821 +
2822 + if (*src == '\'') {
2823 + /* Go into single quote state. */
2824 + in_s_quote = True;
2825 + *dest++ = *src++;
2826 + continue;
2827 + }
2828 +
2829 + if (*src == '\"') {
2830 + /* Go into double quote state. */
2831 + in_d_quote = True;
2832 + *dest++ = *src++;
2833 + continue;
2834 + }
2835 +
2836 + /* Check if we need to escape the character. */
2837 +
2838 + if (!strchr(INCLUDE_LIST, (int)*src)) {
2839 + *dest++ = '\\';
2840 + }
2841 + *dest++ = *src++;
2842 + }
2843 + *dest++ = '\0';
2844 + return ret;
2845 +}
2846 diff -urN samba-3.0.24.orig/source/libads/authdata.c samba-3.0.24/source/libads/authdata.c
2847 --- samba-3.0.24.orig/source/libads/authdata.c 2006-02-23 17:29:34.000000000 +0100
2848 +++ samba-3.0.24/source/libads/authdata.c 2007-08-07 09:38:18.000000000 +0200
2849 @@ -120,10 +120,14 @@
2850 return False;
2851
2852 if (UNMARSHALLING(ps)) {
2853 - array->krb_sid_and_attrs = PRS_ALLOC_MEM(ps, KRB_SID_AND_ATTRS, num);
2854 - if (!array->krb_sid_and_attrs) {
2855 - DEBUG(3, ("No memory available\n"));
2856 - return False;
2857 + if (num) {
2858 + array->krb_sid_and_attrs = PRS_ALLOC_MEM(ps, KRB_SID_AND_ATTRS, num);
2859 + if (!array->krb_sid_and_attrs) {
2860 + DEBUG(3, ("No memory available\n"));
2861 + return False;
2862 + }
2863 + } else {
2864 + array->krb_sid_and_attrs = NULL;
2865 }
2866 }
2867
2868 @@ -184,10 +188,14 @@
2869 return False;
2870
2871 if (UNMARSHALLING(ps)) {
2872 - array->group_membership = PRS_ALLOC_MEM(ps, GROUP_MEMBERSHIP, num);
2873 - if (!array->group_membership) {
2874 - DEBUG(3, ("No memory available\n"));
2875 - return False;
2876 + if (num) {
2877 + array->group_membership = PRS_ALLOC_MEM(ps, GROUP_MEMBERSHIP, num);
2878 + if (!array->group_membership) {
2879 + DEBUG(3, ("No memory available\n"));
2880 + return False;
2881 + }
2882 + } else {
2883 + array->group_membership = NULL;
2884 }
2885 }
2886
2887 @@ -456,10 +464,14 @@
2888 return False;
2889
2890 if (UNMARSHALLING(ps) && length) {
2891 - data->signature.buffer = PRS_ALLOC_MEM(ps, uint8, siglen);
2892 - if (!data->signature.buffer) {
2893 - DEBUG(3, ("No memory available\n"));
2894 - return False;
2895 + if (siglen) {
2896 + data->signature.buffer = PRS_ALLOC_MEM(ps, uint8, siglen);
2897 + if (!data->signature.buffer) {
2898 + DEBUG(3, ("No memory available\n"));
2899 + return False;
2900 + }
2901 + } else {
2902 + data->signature.buffer = NULL;
2903 }
2904 }
2905
2906 diff -urN samba-3.0.24.orig/source/libsmb/clifile.c samba-3.0.24/source/libsmb/clifile.c
2907 --- samba-3.0.24.orig/source/libsmb/clifile.c 2007-02-04 19:59:20.000000000 +0100
2908 +++ samba-3.0.24/source/libsmb/clifile.c 2007-07-17 13:19:05.000000000 +0200
2909 @@ -21,6 +21,8 @@
2910
2911 #include "includes.h"
2912
2913 +#ifndef AVM_SMALLER
2914 +
2915 /****************************************************************************
2916 Hard/Symlink a file (UNIX extensions).
2917 Creates new name (sym)linked to oldname.
2918 @@ -71,6 +73,9 @@
2919 return True;
2920 }
2921
2922 +#endif /* AVM_SMALLER */
2923 +
2924 +
2925 /****************************************************************************
2926 Map standard UNIX permissions onto wire representations.
2927 ****************************************************************************/
2928 @@ -165,6 +170,9 @@
2929 }
2930 }
2931
2932 +
2933 +#ifndef AVM_SMALLER
2934 +
2935 /****************************************************************************
2936 Do a POSIX getfacl (UNIX extensions).
2937 ****************************************************************************/
2938 @@ -1759,3 +1767,6 @@
2939
2940 return cli_get_ea_list(cli, setup, param, 6, ctx, pnum_eas, pea_list);
2941 }
2942 +
2943 +#endif /* AVM_SMALLER */
2944 +
2945 diff -urN samba-3.0.24.orig/source/libsmb/namequery.c samba-3.0.24/source/libsmb/namequery.c
2946 --- samba-3.0.24.orig/source/libsmb/namequery.c 2007-02-04 19:59:20.000000000 +0100
2947 +++ samba-3.0.24/source/libsmb/namequery.c 2007-07-17 13:19:05.000000000 +0200
2948 @@ -1024,6 +1024,7 @@
2949 static BOOL resolve_ads(const char *name, int name_type,
2950 struct ip_service **return_iplist, int *return_count)
2951 {
2952 +#ifdef HAVE_ADS
2953 int i, j;
2954 NTSTATUS status;
2955 TALLOC_CTX *ctx;
2956 @@ -1100,6 +1101,9 @@
2957
2958 talloc_destroy(ctx);
2959 return True;
2960 +#else /* HAVE_ADS */
2961 + return False;
2962 +#endif
2963 }
2964
2965 /*******************************************************************
2966 diff -urN samba-3.0.24.orig/source/libsmb/namequery_dc.c samba-3.0.24/source/libsmb/namequery_dc.c
2967 --- samba-3.0.24.orig/source/libsmb/namequery_dc.c 2006-04-20 04:29:25.000000000 +0200
2968 +++ samba-3.0.24/source/libsmb/namequery_dc.c 2007-07-17 13:19:05.000000000 +0200
2969 @@ -31,6 +31,9 @@
2970
2971 static BOOL ads_dc_name(const char *domain, const char *realm, struct in_addr *dc_ip, fstring srv_name)
2972 {
2973 +#if 1 /* AR7 */
2974 + return False;
2975 +#else
2976 ADS_STRUCT *ads;
2977
2978 if (!realm && strequal(domain, lp_workgroup()))
2979 @@ -63,6 +66,7 @@
2980 srv_name, inet_ntoa(*dc_ip)));
2981
2982 return True;
2983 +#endif /* AR7 */
2984 }
2985
2986 /****************************************************************************
2987 diff -urN samba-3.0.24.orig/source/locking/locking.c samba-3.0.24/source/locking/locking.c
2988 --- samba-3.0.24.orig/source/locking/locking.c 2007-02-04 19:59:23.000000000 +0100
2989 +++ samba-3.0.24/source/locking/locking.c 2007-08-07 09:38:18.000000000 +0200
2990 @@ -1166,6 +1166,11 @@
2991 return NT_STATUS_ACCESS_DENIED;
2992 }
2993
2994 + /* Don't allow delete on close for non-empty directories. */
2995 + if (fsp->is_directory) {
2996 + return can_delete_directory(fsp->conn, fsp->fsp_name);
2997 + }
2998 +
2999 return NT_STATUS_OK;
3000 }
3001
3002 diff -urN samba-3.0.24.orig/source/Makefile samba-3.0.24/source/Makefile
3003 --- samba-3.0.24.orig/source/Makefile 1970-01-01 01:00:00.000000000 +0100
3004 +++ samba-3.0.24/source/Makefile 2008-02-28 11:21:14.000000000 +0100
3005 @@ -0,0 +1,1719 @@
3006 +#########################################################################
3007 +# Makefile.in for Samba - rewritten for autoconf support
3008 +# Copyright Andrew Tridgell 1992-1998
3009 +# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
3010 +# Copyright Andrew Bartlett 2002
3011 +# Copyright (C) 2003 Jim McDonough <jmcd@us.ibm.com>
3012 +# Copyright (C) 2002-2003 Jelmer Vernooij <jelmer@samba.org>
3013 +###########################################################################
3014 +
3015 +SOURCEROOT=$(shell pwd)/../../../..
3016 +SHAREDLIBS=$(SOURCEROOT)/sharedlibs
3017 +
3018 +include ${SHAREDLIBS}/ar7def.mk
3019 +
3020 +# AR7
3021 +# prefix=/usr/local/samba
3022 +prefix=/var/samba
3023 +exec_prefix=${prefix}
3024 +
3025 +# AR7
3026 +# LIBS= -lcrypt -lresolv -lnsl -ldl
3027 +LIBS= -lcrypt -ldl -lpthread
3028 +# AR7
3029 +# CC=gcc
3030 +CC=${TARGET}-gcc
3031 +RANLIB = ${TARGET}-ranlib
3032 +AR = ${TARGET}-ar
3033 +
3034 +SHLD=${CC} ${CFLAGS}
3035 +# AR7
3036 +# CFLAGS= -O -D_SAMBA_BUILD_
3037 +CFLAGS= -Os -D_SAMBA_BUILD_ -DAVM_NO_PRINTING
3038 +CFLAGS+= -DAVM_NO_POPT
3039 +CFLAGS+= -DAVM_SMALLER
3040 +
3041 +# uncomment this to get debugs
3042 +# CFLAGS += -DSAMBA_DEBUG
3043 +
3044 +# AR7
3045 +# CPPFLAGS= -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
3046 +CPPFLAGS= -D_GNU_SOURCE
3047 +EXEEXT=
3048 +LDFLAGS=
3049 +AR=ar
3050 +LDSHFLAGS=-shared -Wl,-Bsymbolic
3051 +WINBIND_NSS_LDSHFLAGS=-shared -Wl,-Bsymbolic
3052 +AWK=gawk
3053 +DYNEXP=-Wl,--export-dynamic
3054 +PYTHON=
3055 +PERL=/usr/bin/perl
3056 +
3057 +ifeq ($(WITH_LFS),yes)
3058 +CFLAGS+= -DWITH_LFS
3059 +CPPFLAGS+= -DWITH_LFS
3060 +endif
3061 +
3062 +TERMLDFLAGS=
3063 +# AR7
3064 +# TERMLIBS=-lreadline -lncurses
3065 +TERMLIBS=
3066 +PRINT_LIBS=
3067 +AUTH_LIBS=-lcrypt
3068 +ACL_LIBS=
3069 +PASSDB_LIBS=
3070 +IDMAP_LIBS=
3071 +KRB5LIBS=
3072 +LDAP_LIBS=
3073 +
3074 +INSTALLCMD=/usr/bin/install -c
3075 +INSTALLCLIENTCMD_SH=$(INSTALLCMD)
3076 +INSTALLCLIENTCMD_A=:
3077 +
3078 +
3079 +srcdir=`pwd`
3080 +builddir=`pwd`
3081 +SHELL=/bin/sh
3082 +DESTDIR=/
3083 +
3084 +# XXX: Perhaps this should be /bin/sh instead -- apparently autoconf
3085 +# will search for a POSIX-compliant shell, and that might not be
3086 +# /bin/sh on some platforms. I guess it's not a big problem -- mbp
3087 +
3088 +# See the autoconf manual "Installation Directory Variables" for a
3089 +# discussion of the subtle use of these variables.
3090 +
3091 +# AR7
3092 +# BASEDIR= /usr/local/samba
3093 +BASEDIR= /var/samba
3094 +BINDIR = ${exec_prefix}/bin
3095 +# sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode.
3096 +SBINDIR = ${exec_prefix}/sbin
3097 +LIBDIR = ${prefix}/lib
3098 +VFSLIBDIR = $(LIBDIR)/vfs
3099 +PDBLIBDIR = $(LIBDIR)/pdb
3100 +RPCLIBDIR = $(LIBDIR)/rpc
3101 +IDMAPLIBDIR = $(LIBDIR)/idmap
3102 +CHARSETLIBDIR = $(LIBDIR)/charset
3103 +AUTHLIBDIR = $(LIBDIR)/auth
3104 +CONFIGDIR = ${LIBDIR}
3105 +VARDIR = ${prefix}/var
3106 +MANDIR = ${prefix}/man
3107 +DATADIR = ${prefix}/share
3108 +
3109 +# The permissions to give the executables
3110 +INSTALLPERMS = 0755
3111 +
3112 +# set these to where to find various files
3113 +# These can be overridden by command line switches (see smbd(8))
3114 +# or in smb.conf (see smb.conf(5))
3115 +LOGFILEBASE = ${VARDIR}
3116 +CONFIGFILE = $(CONFIGDIR)/smb.conf
3117 +LMHOSTSFILE = $(CONFIGDIR)/lmhosts
3118 +
3119 +# This is where smbpasswd et al go
3120 +PRIVATEDIR = ${prefix}/private
3121 +
3122 +SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
3123 +PRIVATE_DIR = $(PRIVATEDIR)
3124 +
3125 +# This is where SWAT images and help files go
3126 +SWATDIR = ${prefix}/swat
3127 +
3128 +# the directory where lock files go
3129 +LOCKDIR = ${VARDIR}/locks
3130 +
3131 +# the directory where pid files go
3132 +PIDDIR = ${VARDIR}/locks
3133 +
3134 +LIBSMBCLIENT=bin/libsmbclient.a bin/libsmbclient.so
3135 +LIBSMBCLIENT_MAJOR=0
3136 +LIBSMBCLIENT_MINOR=1
3137 +
3138 +LIBSMBSHAREMODES=bin/libsmbsharemodes.a bin/libsmbsharemodes.so
3139 +LIBSMBSHAREMODES_MAJOR=0
3140 +LIBSMBSHAREMODES_MINOR=1
3141 +
3142 +
3143 +FLAGS1 = $(CFLAGS) -I./popt -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I. $(CPPFLAGS) -I$(srcdir) -I$(srcdir)/tdb
3144 +FLAGS2 =
3145 +FLAGS3 =
3146 +FLAGS4 =
3147 +FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4)
3148 +FLAGS = $(ISA) $(FLAGS5)
3149 +
3150 +PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATE_DIR)\"
3151 +PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\"
3152 +PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\" -DDRIVERFILE=\"$(DRIVERFILE)\"
3153 +PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
3154 +PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\"
3155 +PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \
3156 + -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"so\"
3157 +PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\"
3158 +PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS)
3159 +
3160 +# Note that all executable programs now provide for an optional executable suffix.
3161 +
3162 +SBIN_PROGS = bin/smbd bin/nmbd bin/swat bin/winbindd$(EXEEXT)
3163 +
3164 +BIN_PROGS1 = bin/smbclient bin/net bin/smbspool \
3165 + bin/testparm bin/smbstatus
3166 +BIN_PROGS2 = bin/smbcontrol bin/smbtree bin/tdbbackup \
3167 + bin/nmblookup bin/pdbedit bin/tdbdump \
3168 + bin/tdbtool
3169 +BIN_PROGS3 = bin/smbpasswd bin/rpcclient bin/smbcacls \
3170 + bin/profiles bin/ntlm_auth \
3171 + bin/smbcquotas
3172 +
3173 +TORTURE_PROGS = bin/smbtorture bin/msgtest \
3174 + bin/masktest bin/locktest \
3175 + bin/locktest2 bin/nsstest bin/vfstest
3176 +
3177 +BIN_PROGS = $(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) bin/wbinfo$(EXEEXT)
3178 +
3179 +EVERYTHING_PROGS = bin/debug2html bin/smbfilter bin/talloctort \
3180 + bin/log2pcap
3181 +
3182 +SHLIBS = nsswitch/libnss_winbind.so nsswitch/libnss_wins.so libsmbclient libsmbsharemodes
3183 +
3184 +SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
3185 +
3186 +VFS_MODULES = bin/recycle.so bin/audit.so bin/extd_audit.so bin/full_audit.so bin/netatalk.so bin/fake_perms.so bin/default_quota.so bin/readonly.so bin/cap.so bin/expand_msdfs.so bin/shadow_copy.so
3187 +PDB_MODULES =
3188 +RPC_MODULES =
3189 +IDMAP_MODULES =
3190 +CHARSET_MODULES = bin/CP850.so bin/CP437.so
3191 +AUTH_MODULES =
3192 +MODULES = $(VFS_MODULES) $(PDB_MODULES) $(RPC_MODULES) $(IDMAP_MODULES) $(CHARSET_MODULES) $(AUTH_MODULES)
3193 +
3194 +######################################################################
3195 +# object file lists
3196 +######################################################################
3197 +
3198 +TDBBASE_OBJ = tdb/tdb.o tdb/spinlock.o
3199 +
3200 +TDB_OBJ = $(TDBBASE_OBJ) tdb/tdbutil.o tdb/tdbback.o
3201 +
3202 +SMBLDAP_OBJ =
3203 +
3204 +VERSION_OBJ = lib/version.o
3205 +
3206 +DOSERR_OBJ = libsmb/doserr.o
3207 +
3208 +SNPRINTF_OBJ = lib/snprintf.o
3209 +
3210 +WBCOMMON_OBJ = nsswitch/wb_common.o
3211 +
3212 +AFS_OBJ = lib/afs.o
3213 +
3214 +AFS_SETTOKEN_OBJ = lib/afs_settoken.o
3215 +
3216 +SERVER_MUTEX_OBJ = lib/server_mutex.o
3217 +
3218 +ERRORMAP_OBJ = libsmb/errormap.o
3219 +
3220 +PASSCHANGE_OBJ = libsmb/passchange.o
3221 +
3222 +SOCKET_WRAPPER_OBJ = lib/socket_wrapper.o
3223 +
3224 +RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o
3225 +
3226 +LIB_OBJ = $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
3227 + lib/getsmbpass.o lib/interface.o lib/md4.o \
3228 + lib/interfaces.o lib/pidfile.o lib/replace.o lib/replace1.o \
3229 + lib/signal.o lib/system.o lib/sendfile.o lib/time.o \
3230 + lib/ufc.o lib/genrand.o lib/username.o \
3231 + lib/util_pw.o lib/access.o lib/smbrun.o \
3232 + lib/bitmap.o lib/crc32.o $(SNPRINTF_OBJ) lib/dprintf.o \
3233 + lib/xfile.o lib/wins_srv.o \
3234 + lib/util_str.o lib/clobber.o lib/util_sid.o lib/util_uuid.o \
3235 + lib/util_unistr.o lib/util_file.o lib/data_blob.o \
3236 + lib/util.o lib/util_sock.o lib/sock_exec.o lib/util_sec.o \
3237 + lib/talloc.o lib/substitute.o lib/fsusage.o \
3238 + lib/ms_fnmatch.o lib/select.o lib/messages.o \
3239 + lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \
3240 + lib/md5.o lib/hmacmd5.o lib/iconv.o \
3241 + nsswitch/wb_client.o $(WBCOMMON_OBJ) \
3242 + lib/pam_errors.o intl/lang_tdb.o lib/account_pol.o \
3243 + lib/adt_tree.o lib/gencache.o $(TDB_OBJ) \
3244 + lib/module.o lib/ldap_escape.o \
3245 + lib/privileges.o lib/secdesc.o lib/secace.o lib/secacl.o \
3246 + lib/arc4.o lib/sharesec.o lib/events.o lib/util_nscd.o
3247 +
3248 +LIB_NONSMBD_OBJ = $(LIB_OBJ) lib/dummysmbd.o lib/dummyroot.o
3249 +
3250 +READLINE_OBJ = lib/readline.o
3251 +
3252 +# Also depends on $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
3253 +# Be sure to include them into your application
3254 +
3255 +# AR7 POPT_LIB_OBJ = lib/popt_common.o
3256 +POPT_LIB_OBJ =
3257 +
3258 +UBIQX_OBJ = ubiqx/ubi_BinTree.o ubiqx/ubi_Cache.o ubiqx/ubi_SplayTree.o \
3259 + ubiqx/ubi_dLinkList.o ubiqx/ubi_sLinkList.o
3260 +
3261 +PARAM_OBJ = dynconfig.o param/loadparm.o param/params.o
3262 +
3263 +KRBCLIENT_OBJ = libads/kerberos.o libads/ads_status.o
3264 +
3265 +LIBADS_OBJ = libads/ldap.o libads/ldap_printer.o libads/sasl.o \
3266 + libads/krb5_setpw.o libads/ldap_user.o \
3267 + libads/ads_struct.o libads/kerberos_keytab.o \
3268 + libads/disp_sec.o libads/ads_utils.o libads/ldap_utils.o \
3269 + libads/authdata.o
3270 +
3271 +LIBADS_SERVER_OBJ = libads/util.o libads/kerberos_verify.o
3272 +
3273 +SECRETS_OBJ = passdb/secrets.o passdb/machine_sid.o
3274 +
3275 +LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
3276 + libsmb/namequery.o libsmb/conncache.o
3277 +
3278 +LIBSAMBA_OBJ = libsmb/nterr.o libsmb/smbdes.o libsmb/smbencrypt.o libsmb/ntlm_check.o \
3279 + libsmb/ntlmssp.o libsmb/ntlmssp_parse.o libsmb/ntlmssp_sign.o
3280 +
3281 +LIBSMB_OBJ = \
3282 + libsmb/clifile.o \
3283 + lib/util_seaccess.o \
3284 + libsmb/clikrb5.o \
3285 + libsmb/clispnego.o \
3286 + libsmb/asn1.o \
3287 + libsmb/clierror.o \
3288 + libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
3289 + libsmb/clioplock.o $(ERRORMAP_OBJ) \
3290 + $(DOSERR_OBJ) \
3291 + $(RPC_PARSE_OBJ1) $(LIBSAMBA_OBJ) $(LIBNMB_OBJ)
3292 +
3293 +# LIBSMB_OBJ = \
3294 +# libsmb/clientgen.o \
3295 +# libsmb/cliconnect.o \
3296 +# libsmb/clifile.o \
3297 +# libsmb/clikrb5.o libsmb/clispnego.o libsmb/asn1.o \
3298 +# libsmb/clirap.o libsmb/clierror.o libsmb/climessage.o \
3299 +# libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \
3300 +# libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \
3301 +# libsmb/clistr.o lib/util_seaccess.o \
3302 +# libsmb/cliquota.o libsmb/clifsinfo.o libsmb/clidfs.o \
3303 +# libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
3304 +# libsmb/clioplock.o $(ERRORMAP_OBJ) libsmb/clirap2.o \
3305 +# $(DOSERR_OBJ) \
3306 +# $(RPC_PARSE_OBJ1) $(LIBSAMBA_OBJ) $(LIBNMB_OBJ)
3307 +
3308 +
3309 +LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
3310 + rpc_client/cli_netlogon.o rpc_client/cli_srvsvc.o \
3311 + rpc_client/cli_wkssvc.o rpc_client/cli_dfs.o \
3312 + rpc_client/cli_reg.o $(RPC_CLIENT_OBJ) \
3313 + rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o \
3314 + rpc_client/cli_ds.o rpc_client/cli_echo.o \
3315 + rpc_client/cli_shutdown.o rpc_client/cli_svcctl.o
3316 +
3317 +REGOBJS_OBJ = registry/reg_objects.o
3318 +
3319 +REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o \
3320 + registry/reg_db.o registry/reg_eventlog.o registry/reg_shares.o \
3321 + registry/reg_util.o registry/reg_dynamic.o
3322 +
3323 +RPC_LSA_OBJ = \
3324 +
3325 +# rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o
3326 +
3327 +RPC_NETLOG_OBJ = \
3328 +
3329 +# rpc_server/srv_netlog.o rpc_server/srv_netlog_nt.o
3330 +
3331 +RPC_SAMR_OBJ = \
3332 + rpc_server/srv_samr_util.o
3333 +
3334 +# rpc_server/srv_samr.o
3335 +# rpc_server/srv_samr_nt.o
3336 +
3337 +REGFIO_OBJ = registry/regfio.o
3338 +
3339 +RPC_REG_OBJ = \
3340 +
3341 +# rpc_server/srv_reg.o rpc_server/srv_reg_nt.o $(REGFIO_OBJ)
3342 +
3343 +RPC_LSA_DS_OBJ = \
3344 +
3345 +# rpc_server/srv_lsa_ds.o rpc_server/srv_lsa_ds_nt.o
3346 +
3347 +RPC_SVC_OBJ = \
3348 + rpc_server/srv_srvsvc.o \
3349 + rpc_server/srv_srvsvc_nt.o
3350 +
3351 +
3352 +
3353 +RPC_WKS_OBJ = \
3354 + rpc_server/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o
3355 +
3356 +RPC_SVCCTL_OBJ = \
3357 +
3358 +# rpc_server/srv_svcctl.o rpc_server/srv_svcctl_nt.o \
3359 +# services/svc_spoolss.o services/svc_rcinit.o services/services_db.o
3360 +
3361 +RPC_DFS_OBJ = \
3362 +
3363 +# rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o
3364 +
3365 +RPC_SPOOLSS_OBJ = \
3366 +
3367 +# rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o
3368 +
3369 +RPC_EVENTLOG_OBJ = \
3370 +
3371 +# rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o
3372 +
3373 +RPC_PIPE_OBJ = \
3374 + rpc_server/srv_pipe_hnd.o \
3375 + rpc_server/srv_pipe.o \
3376 + rpc_server/srv_lsa_hnd.o
3377 +
3378 +# rpc_server/srv_util.o
3379 +
3380 +
3381 +RPC_ECHO_OBJ = rpc_server/srv_echo.o rpc_server/srv_echo_nt.o
3382 +
3383 +RPC_SERVER_OBJ = $(RPC_LSA_OBJ) $(RPC_REG_OBJ) $(RPC_LSA_DS_OBJ) $(RPC_WKS_OBJ) $(RPC_SVCCTL_OBJ) $(RPC_NETLOG_OBJ) $(RPC_DFS_OBJ) $(RPC_SVC_OBJ) $(RPC_EVENTLOG_OBJ) $(RPC_SAMR_OBJ) $(RPC_PIPE_OBJ)
3384 +
3385 +# this includes only the low level parse code, not stuff
3386 +# that requires knowledge of security contexts
3387 +RPC_PARSE_OBJ1 = $(RPC_PARSE_OBJ0) rpc_parse/parse_sec.o
3388 +
3389 +RPC_PARSE_OBJ = \
3390 + rpc_parse/parse_rpc.o \
3391 + rpc_parse/parse_lsa.o \
3392 + rpc_parse/parse_net.o \
3393 + rpc_parse/parse_wks.o rpc_parse/parse_ds.o \
3394 + rpc_parse/parse_spoolss.o \
3395 + rpc_parse/parse_dfs.o \
3396 + rpc_parse/parse_echo.o rpc_parse/parse_shutdown.o \
3397 + rpc_parse/parse_buffer.o $(REGOBJS_OBJ) \
3398 + rpc_parse/parse_srv.o
3399 +
3400 +# rpc_parse/parse_eventlog.o \
3401 +# rpc_parse/parse_svcctl.o \
3402 +# rpc_parse/parse_reg.o
3403 +# rpc_parse/parse_samr.o
3404 +
3405 +
3406 +RPC_CLIENT_OBJ = rpc_client/cli_pipe.o
3407 +
3408 +LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o
3409 +
3410 +PASSDB_GET_SET_OBJ = passdb/pdb_get_set.o
3411 +
3412 +PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \
3413 + passdb/pdb_compat.o \
3414 + passdb/lookup_sid.o \
3415 + passdb/login_cache.o passdb/pdb_smbpasswd.o passdb/pdb_tdb.o \
3416 + lib/system_smbd.o \
3417 + passdb/lookup_sid.o passdb/util_builtin.o \
3418 + passdb/util_wellknown.o passdb/util_unixsids.o
3419 +
3420 +XML_OBJ = passdb/pdb_xml.o
3421 +MYSQL_OBJ = passdb/pdb_mysql.o
3422 +PGSQL_OBJ = passdb/pdb_pgsql.o
3423 +DEVEL_HELP_WEIRD_OBJ = modules/weird.o
3424 +CP850_OBJ = modules/CP850.o
3425 +CP437_OBJ = modules/CP437.o
3426 +CHARSET_MACOSXFS_OBJ = modules/charset_macosxfs.o
3427 +
3428 +GROUPDB_OBJ = groupdb/mapping.o
3429 +
3430 +PROFILE_OBJ = profile/profile.o
3431 +PROFILES_OBJ = utils/profiles.o
3432 +
3433 +OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o
3434 +
3435 +NOTIFY_OBJ = smbd/notify.o smbd/notify_hash.o smbd/notify_kernel.o
3436 +
3437 +VFS_AUDIT_OBJ = modules/vfs_audit.o
3438 +VFS_EXTD_AUDIT_OBJ = modules/vfs_extd_audit.o
3439 +VFS_FULL_AUDIT_OBJ = modules/vfs_full_audit.o
3440 +VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o
3441 +VFS_RECYCLE_OBJ = modules/vfs_recycle.o
3442 +VFS_NETATALK_OBJ = modules/vfs_netatalk.o
3443 +VFS_DEFAULT_QUOTA_OBJ = modules/vfs_default_quota.o
3444 +VFS_READONLY_OBJ = modules/vfs_readonly.o modules/getdate.o
3445 +VFS_CAP_OBJ = modules/vfs_cap.o
3446 +VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o
3447 +VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o
3448 +VFS_AFSACL_OBJ = modules/vfs_afsacl.o
3449 +VFS_CATIA_OBJ = modules/vfs_catia.o
3450 +
3451 +PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
3452 +
3453 +SLCACHE_OBJ = libsmb/samlogon_cache.o
3454 +
3455 +DCUTIL_OBJ = libsmb/namequery_dc.o
3456 +
3457 +# libsmb/trustdom_cache.o
3458 +# libsmb/trusts_util.o
3459 +
3460 +AUTH_BUILTIN_OBJ = auth/auth_builtin.o
3461 +AUTH_DOMAIN_OBJ = auth/auth_domain.o
3462 +AUTH_SAM_OBJ = auth/auth_sam.o
3463 +AUTH_RHOSTS_OBJ = auth/auth_rhosts.o
3464 +AUTH_SERVER_OBJ = auth/auth_server.o
3465 +AUTH_UNIX_OBJ = auth/auth_unix.o
3466 +AUTH_WINBIND_OBJ = auth/auth_winbind.o
3467 +
3468 +AUTH_OBJ = auth/auth.o $(AUTH_SAM_OBJ) $(AUTH_BUILTIN_OBJ) auth/auth_util.o auth/auth_compat.o \
3469 + auth/auth_ntlmssp.o \
3470 + $(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ)
3471 +
3472 +# AUTH_OBJ = auth/auth.o $(AUTH_RHOSTS_OBJ) $(AUTH_SAM_OBJ) $(AUTH_UNIX_OBJ) $(AUTH_WINBIND_OBJ) $(AUTH_SERVER_OBJ) $(AUTH_DOMAIN_OBJ) $(AUTH_BUILTIN_OBJ) auth/auth_util.o auth/auth_compat.o \
3473 +# auth/auth_ntlmssp.o \
3474 +# $(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ)
3475 +
3476 +MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_map.o smbd/mangle_hash2.o
3477 +
3478 +SMBD_OBJ_MAIN = smbd/server.o
3479 +
3480 +BUILDOPT_OBJ = smbd/build_options.o
3481 +
3482 +SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o smbd/connection.o \
3483 + smbd/utmp.o smbd/session.o \
3484 + smbd/dfree.o smbd/dir.o smbd/password.o smbd/conn.o smbd/fileio.o \
3485 + smbd/message.o smbd/nttrans.o \
3486 + smbd/reply.o smbd/sesssetup.o smbd/trans2.o smbd/uid.o \
3487 + smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
3488 + smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
3489 + smbd/vfs.o smbd/vfs-wrap.o smbd/statcache.o \
3490 + smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
3491 + smbd/process.o smbd/service.o smbd/error.o \
3492 + smbd/fake_file.o \
3493 + smbd/msdfs.o \
3494 + smbd/aio.o \
3495 + $(MANGLE_OBJ) \
3496 + smbd/negprot.o \
3497 + smbd/ipc.o \
3498 + smbd/lanman.o \
3499 + smbd/change_trust_pw.o \
3500 + smbd/pipes.o \
3501 + smbd/share_access.o \
3502 + smbd/statvfs.o \
3503 + smbd/map_username.o
3504 +
3505 +
3506 +SMBD_OBJ_BASE = $(PARAM_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
3507 + $(RPC_SERVER_OBJ) $(RPC_PARSE_OBJ) $(SECRETS_OBJ) \
3508 + $(LOCKING_OBJ) $(PASSDB_OBJ) $(PROFILE_OBJ) \
3509 + $(LIB_OBJ) $(OPLOCK_OBJ) \
3510 + $(NOTIFY_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \
3511 + libads/ads_status.o
3512 +
3513 +# $(REGISTRY_OBJ)
3514 +# $(LIBMSRPC_OBJ)
3515 +
3516 +PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \
3517 + printing/print_cups.o printing/print_generic.o \
3518 + printing/lpq_parse.o printing/load.o
3519 +
3520 +PRINTBASE_OBJ = printing/notify.o printing/printing_db.o
3521 +
3522 +PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ)
3523 +
3524 +# SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN)
3525 +
3526 +
3527 +NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \
3528 + nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \
3529 + nmbd/nmbd_browsesync.o nmbd/nmbd_elections.o \
3530 + nmbd/nmbd_incomingdgrams.o nmbd/nmbd_incomingrequests.o \
3531 + nmbd/nmbd_lmhosts.o nmbd/nmbd_logonnames.o nmbd/nmbd_mynames.o \
3532 + nmbd/nmbd_namelistdb.o nmbd/nmbd_namequery.o \
3533 + nmbd/nmbd_nameregister.o nmbd/nmbd_namerelease.o \
3534 + nmbd/nmbd_nodestatus.o nmbd/nmbd_packets.o \
3535 + nmbd/nmbd_processlogon.o nmbd/nmbd_responserecordsdb.o \
3536 + nmbd/nmbd_sendannounce.o nmbd/nmbd_serverlistdb.o \
3537 + nmbd/nmbd_subnetdb.o nmbd/nmbd_winsproxy.o nmbd/nmbd_winsserver.o \
3538 + nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o
3539 +
3540 +NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(UBIQX_OBJ) \
3541 + $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ)
3542 +
3543 +WREPL_OBJ1 =
3544 +
3545 +WREPL_OBJ = $(WREPL_OBJ1) $(PARAM_OBJ) $(UBIQX_OBJ) \
3546 + $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) \
3547 + $(LIBSAMBA_OBJ)
3548 +
3549 +SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
3550 + web/swat.o web/neg_lang.o
3551 +
3552 +SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(LIBSMB_OBJ) \
3553 + $(LOCKING_OBJ) $(PASSDB_OBJ) $(SECRETS_OBJ) $(KRBCLIENT_OBJ) \
3554 + $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \
3555 + $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_OBJ) \
3556 + $(PASSCHANGE_OBJ)
3557 +
3558 +SMBSH_OBJ = smbwrapper/smbsh.o smbwrapper/shared.o \
3559 + $(PARAM_OBJ) $(LIB_NONSMBD_OBJ)
3560 +
3561 +STATUS_OBJ = utils/status.o $(LOCKING_OBJ) $(PARAM_OBJ) \
3562 + $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
3563 + $(SECRETS_OBJ) $(LIBSAMBA_OBJ) $(ERRORMAP_OBJ)
3564 +
3565 +
3566 +SMBCONTROL_OBJ = utils/smbcontrol.o $(LOCKING_OBJ) $(PARAM_OBJ) \
3567 + $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
3568 + $(SECRETS_OBJ) $(LIBSAMBA_OBJ) \
3569 + $(PRINTBASE_OBJ) $(ERRORMAP_OBJ)
3570 +
3571 +SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \
3572 + $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) \
3573 + $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ)
3574 +
3575 +TESTPARM_OBJ = utils/testparm.o \
3576 + $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
3577 + $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
3578 +
3579 +SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSCHANGE_OBJ) $(PARAM_OBJ) $(SECRETS_OBJ) \
3580 + $(LIBSMB_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ)\
3581 + $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
3582 + $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_OBJ)
3583 +
3584 +PDBEDIT_OBJ = utils/pdbedit.o $(PARAM_OBJ) $(PASSDB_OBJ) $(LIBSAMBA_OBJ) \
3585 + $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(SECRETS_OBJ) \
3586 + $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) libsmb/asn1.o
3587 +
3588 +SMBGET_OBJ = utils/smbget.o $(POPT_LIB_OBJ) $(LIBSMBCLIENT_OBJ)
3589 +
3590 +RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
3591 + rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
3592 + rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \
3593 + rpcclient/cmd_dfs.o rpcclient/cmd_reg.o \
3594 + rpcclient/cmd_ds.o \
3595 + rpcclient/cmd_echo.o rpcclient/cmd_shutdown.o
3596 +
3597 +RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
3598 + $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
3599 + $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(LIBMSRPC_OBJ) \
3600 + $(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \
3601 + $(LIBADS_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) \
3602 + $(SMBLDAP_OBJ) $(DCUTIL_OBJ)
3603 +
3604 +PAM_WINBIND_PICOBJ = nsswitch/pam_winbind.po \
3605 + nsswitch/wb_common.po lib/replace1.po \
3606 + lib/snprintf.po
3607 +
3608 +SMBW_OBJ1 = smbwrapper/smbw.o \
3609 + smbwrapper/smbw_dir.o smbwrapper/smbw_stat.o \
3610 + smbwrapper/realcalls.o smbwrapper/shared.o \
3611 + smbwrapper/smbw_cache.o
3612 +
3613 +SMBW_OBJ = $(SMBW_OBJ1) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(PARAM_OBJ) \
3614 + $(LIB_NONSMBD_OBJ)
3615 +
3616 +SMBWRAPPER_OBJ1 = smbwrapper/wrapped.o
3617 +
3618 +SMBWRAPPER_OBJ = $(SMBW_OBJ) $(SMBWRAPPER_OBJ1)
3619 +
3620 +LIBSMBCLIENT_OBJ = libsmb/libsmbclient.o libsmb/libsmb_compat.o \
3621 + libsmb/libsmb_cache.o \
3622 + $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
3623 + $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
3624 + $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) \
3625 + $(SECRETS_OBJ) $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ)
3626 +
3627 +LIBSMBSHAREMODES_OBJ = libsmb/smb_share_modes.o tdb/tdb.o tdb/spinlock.o
3628 +# This shared library is intended for linking with unit test programs
3629 +# to test Samba internals. It's called libbigballofmud.so to
3630 +# discourage casual usage.
3631 +
3632 +LIBBIGBALLOFMUD_MAJOR = 0
3633 +
3634 +LIBBIGBALLOFMUD_OBJ = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(UBIQX_OBJ) $(SECRETS_OBJ) \
3635 + $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) \
3636 + $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ)
3637 +
3638 +LIBBIGBALLOFMUD_PICOBJS = $(LIBBIGBALLOFMUD_OBJ:.o=.po)
3639 +
3640 +CLIENT_OBJ1 = client/client.o client/clitar.o
3641 +
3642 +CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
3643 + $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
3644 + $(READLINE_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ)
3645 +
3646 +NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
3647 + utils/net_rap.o utils/net_rpc.o utils/net_rpc_samsync.o \
3648 + utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o \
3649 + utils/net_cache.o utils/net_groupmap.o utils/net_idmap.o \
3650 + utils/net_status.o utils/net_rpc_printer.o utils/net_rpc_rights.o \
3651 + utils/net_rpc_service.o utils/net_rpc_registry.o
3652 +
3653 +NET_OBJ = $(NET_OBJ1) $(PARAM_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) \
3654 + $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
3655 + $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
3656 + $(LIBMSRPC_OBJ) $(IDMAP_OBJ) \
3657 + $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \
3658 + $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(SERVER_MUTEX_OBJ) \
3659 + $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(PRINTERDB_OBJ) $(REGFIO_OBJ)
3660 +
3661 +CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
3662 + $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(SECRETS_OBJ)
3663 +
3664 +MOUNT_OBJ = client/smbmount.o \
3665 + $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
3666 +
3667 +MNT_OBJ = client/smbmnt.o $(VERSION_OBJ) $(SNPRINTF_OBJ)
3668 +
3669 +UMOUNT_OBJ = client/smbumount.o
3670 +
3671 +NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(LIBNMB_OBJ) \
3672 + $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
3673 +
3674 +SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/utable.o \
3675 + torture/denytest.o torture/mangle_test.o
3676 +
3677 +SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) \
3678 + $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
3679 +
3680 +MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
3681 + $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
3682 +
3683 +MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
3684 + $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
3685 +
3686 +LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \
3687 + $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
3688 +
3689 +NSSTEST_OBJ = torture/nsstest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
3690 + $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
3691 +
3692 +VFSTEST_OBJ = torture/cmd_vfs.o torture/vfstest.o $(SMBD_OBJ_BASE) $(READLINE_OBJ)
3693 +
3694 +SMBICONV_OBJ = $(PARAM_OBJ) torture/smbiconv.o $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
3695 +
3696 +LOG2PCAP_OBJ = utils/log2pcaphex.o
3697 +
3698 +LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \
3699 + $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
3700 +
3701 +SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
3702 + $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
3703 + $(PASSDB_OBJ) $(GROUPDB_OBJ) $(LIBMSRPC_OBJ) $(SECRETS_OBJ) \
3704 + $(POPT_LIB_OBJ) $(DCUTIL_OBJ) $(LIBADS_OBJ) $(SMBLDAP_OBJ)
3705 +
3706 +SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
3707 + $(PARAM_OBJ) \
3708 + $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
3709 + $(LIBMSRPC_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) \
3710 + $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ)
3711 +
3712 +TALLOCTORT_OBJ = lib/talloctort.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) libsmb/nterr.o
3713 +
3714 +RPCTORTURE_OBJ = torture/rpctorture.o \
3715 + rpcclient/display.o \
3716 + rpcclient/cmd_lsarpc.o \
3717 + rpcclient/cmd_wkssvc.o \
3718 + rpcclient/cmd_samr.o \
3719 + rpcclient/cmd_srvsvc.o \
3720 + rpcclient/cmd_netlogon.o \
3721 + $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
3722 + $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_GET_SET_OBJ)
3723 +
3724 +DEBUG2HTML_OBJ = utils/debug2html.o ubiqx/debugparse.o
3725 +
3726 +SMBFILTER_OBJ = utils/smbfilter.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(SECRETS_OBJ) \
3727 + $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ)
3728 +
3729 +PROTO_OBJ = $(SMBD_OBJ_MAIN) \
3730 + $(SMBD_OBJ_SRV) $(NMBD_OBJ1) $(SWAT_OBJ1) $(LIB_OBJ) $(LIBSMB_OBJ) \
3731 + $(SMBTORTURE_OBJ1) $(RPCCLIENT_OBJ1) \
3732 + $(LIBMSRPC_OBJ) \
3733 + $(RPC_PIPE_OBJ) $(RPC_PARSE_OBJ) $(KRBCLIENT_OBJ) \
3734 + $(AUTH_OBJ) $(PARAM_OBJ) $(LOCKING_OBJ) $(SECRETS_OBJ) \
3735 + $(PRINTING_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) $(NOTIFY_OBJ) \
3736 + $(PASSDB_OBJ) $(GROUPDB_OBJ) \
3737 + $(READLINE_OBJ) $(PROFILE_OBJ) $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) \
3738 + $(AUTH_SAM_OBJ) $(REGISTRY_OBJ) $(POPT_LIB_OBJ) \
3739 + $(RPC_LSA_OBJ) $(RPC_NETLOG_OBJ) $(RPC_SAMR_OBJ) $(RPC_REG_OBJ) $(RPC_LSA_DS_OBJ) \
3740 + $(RPC_SVC_OBJ) $(RPC_WKS_OBJ) $(RPC_DFS_OBJ) $(RPC_SPOOLSS_OBJ) \
3741 + $(RPC_ECHO_OBJ) $(RPC_SVCCTL_OBJ) $(RPC_EVENTLOG_OBJ) $(SMBLDAP_OBJ) \
3742 + $(IDMAP_OBJ) libsmb/spnego.o $(PASSCHANGE_OBJ)
3743 +
3744 +WINBIND_WINS_NSS_OBJ = nsswitch/wins.o $(PARAM_OBJ) \
3745 + $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ)
3746 +
3747 +WINBIND_WINS_NSS_PICOBJS = $(WINBIND_WINS_NSS_OBJ:.o=.po)
3748 +
3749 +PICOBJS = $(SMBWRAPPER_OBJ:.o=.po)
3750 +LIBSMBCLIENT_PICOBJS = $(LIBSMBCLIENT_OBJ:.o=.po)
3751 +LIBSMBSHAREMODES_PICOBJS = $(LIBSMBSHAREMODES_OBJ:.o=.po)
3752 +
3753 +PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
3754 + pam_smbpass/pam_smb_acct.o pam_smbpass/support.o \
3755 + $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
3756 + $(SECRETS_OBJ) $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ)
3757 +
3758 +PAM_SMBPASS_PICOOBJ = $(PAM_SMBPASS_OBJ_0:.o=.po)
3759 +
3760 +IDMAP_OBJ = sam/idmap.o sam/idmap_util.o sam/idmap_tdb.o
3761 +
3762 +WINBINDD_OBJ1 = \
3763 + nsswitch/winbindd.o \
3764 + nsswitch/winbindd_user.o \
3765 + nsswitch/winbindd_group.o \
3766 + nsswitch/winbindd_util.o \
3767 + nsswitch/winbindd_cache.o \
3768 + nsswitch/winbindd_pam.o \
3769 + nsswitch/winbindd_sid.o \
3770 + nsswitch/winbindd_misc.o \
3771 + nsswitch/winbindd_cm.o \
3772 + nsswitch/winbindd_wins.o \
3773 + nsswitch/winbindd_rpc.o \
3774 + nsswitch/winbindd_reconnect.o \
3775 + nsswitch/winbindd_ads.o \
3776 + nsswitch/winbindd_passdb.o \
3777 + nsswitch/winbindd_dual.o \
3778 + nsswitch/winbindd_async.o
3779 +
3780 +WINBINDD_OBJ = \
3781 + $(WINBINDD_OBJ1) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
3782 + $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
3783 + $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) \
3784 + $(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \
3785 + $(SECRETS_OBJ) $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
3786 + $(DCUTIL_OBJ) $(IDMAP_OBJ) \
3787 + $(AFS_OBJ) $(AFS_SETTOKEN_OBJ)
3788 +
3789 +WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
3790 + $(SECRETS_OBJ) $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ)
3791 +
3792 +WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) lib/replace1.o nsswitch/winbind_nss_linux.o
3793 +
3794 +WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.po) lib/snprintf.po
3795 +
3796 +POPT_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
3797 + popt/popthelp.o popt/poptparse.o
3798 +
3799 +TDBBACKUP_OBJ = tdb/tdbbackup.o tdb/tdbback.o $(SNPRINTF_OBJ) $(TDBBASE_OBJ)
3800 +
3801 +TDBTOOL_OBJ = tdb/tdbtool.o $(TDBBASE_OBJ) $(SNPRINTF_OBJ)
3802 +
3803 +TDBDUMP_OBJ = tdb/tdbdump.o $(TDBBASE_OBJ) $(SNPRINTF_OBJ)
3804 +
3805 +NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o
3806 +
3807 +NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
3808 + libsmb/asn1.o libsmb/spnego.o libsmb/clikrb5.o libads/kerberos.o \
3809 + libads/kerberos_verify.o $(SECRETS_OBJ) $(SERVER_MUTEX_OBJ) \
3810 + libads/authdata.o $(RPC_PARSE_OBJ0) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
3811 + $(SMBLDAP_OBJ) $(DOSERR_OBJ)
3812 +
3813 +######################################################################
3814 +# now the rules...
3815 +######################################################################
3816 +all : SHOWFLAGS proto_exists bin/smbd bin/smbpasswd
3817 +
3818 +pam_smbpass : SHOWFLAGS bin/pam_smbpass.so
3819 +
3820 +smbwrapper : SHOWFLAGS
3821 +
3822 +torture : SHOWFLAGS $(TORTURE_PROGS)
3823 +
3824 +smbtorture : SHOWFLAGS bin/smbtorture
3825 +
3826 +masktest : SHOWFLAGS bin/masktest
3827 +
3828 +msgtest : SHOWFLAGS bin/msgtest
3829 +
3830 +locktest : SHOWFLAGS bin/locktest
3831 +
3832 +smbcacls : SHOWFLAGS bin/smbcacls
3833 +
3834 +smbcquotas : SHOWFLAGS bin/smbcquotas
3835 +
3836 +locktest2 : SHOWFLAGS bin/locktest2
3837 +
3838 +rpctorture : SHOWFLAGS bin/rpctorture
3839 +
3840 +debug2html : SHOWFLAGS bin/debug2html
3841 +
3842 +smbfilter : SHOWFLAGS bin/smbfilter
3843 +
3844 +talloctort : SHOWFLAGS bin/talloctort
3845 +
3846 +nsswitch : SHOWFLAGS bin/winbindd bin/wbinfo nsswitch/libnss_winbind.so \
3847 + nsswitch/libnss_wins.so nsswitch/pam_winbind.so
3848 +
3849 +wins : SHOWFLAGS nsswitch/libnss_wins.so
3850 +
3851 +modules: SHOWFLAGS proto_exists $(MODULES)
3852 +
3853 +everything: all libsmbclient debug2html smbfilter talloctort modules torture \
3854 + $(EVERYTHING_PROGS)
3855 +
3856 +.SUFFIXES:
3857 +.SUFFIXES: .c .o .po .lo
3858 +
3859 +SHOWFLAGS:
3860 + @echo "Using FLAGS = $(FLAGS)"
3861 + @echo " LIBS = $(LIBS)"
3862 + @echo " LDSHFLAGS = $(LDSHFLAGS)"
3863 + @echo " LDFLAGS = $(LDFLAGS)"
3864 + @echo " CFLAGS= $(CFLAGS)"
3865 + @echo " WITH_LFS= $(WITH_LFS)"
3866 +
3867 +
3868 +MAKEDIR = || exec false; \
3869 + if test -d "$$dir"; then :; else \
3870 + echo mkdir "$$dir"; \
3871 + mkdir -p "$$dir" >/dev/null 2>&1 || \
3872 + test -d "$$dir" || \
3873 + mkdir "$$dir" || \
3874 + exec false; fi || exec false
3875 +
3876 +.c.o:
3877 + @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
3878 + dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
3879 + @echo Compiling $*.c
3880 + @$(CC) -I. -I$(srcdir) $(FLAGS) -c $< \
3881 + -o $@
3882 +# -mv `echo $@ | sed 's%^.*/%%g'` $@
3883 +
3884 +# this adds support for precompiled headers. To use it, install a snapshot
3885 +# of gcc-3.4 and run 'make pch' before you do the main build.
3886 +pch:
3887 + rm -f $(srcdir)/include/includes.h.gch
3888 + $(CC) -I. -I$(srcdir) $(FLAGS) -c $(srcdir)/include/includes.h -o $(srcdir)/include/includes.h.gch
3889 +
3890 +# These dependencies are only approximately correct: we want to make
3891 +# sure Samba's paths are updated if ./configure is re-run. Really it
3892 +# would be nice if "make prefix=/opt/samba all" also rebuilt things,
3893 +# but since we also require "make install prefix=/opt/samba" *not* to
3894 +# rebuild it's a bit hard.
3895 +
3896 +dynconfig.o: dynconfig.c Makefile
3897 + @echo Compiling $*.c
3898 + @$(CC) $(FLAGS) $(PATH_FLAGS) -c $(srcdir)/dynconfig.c -o $@
3899 +
3900 +dynconfig.po: dynconfig.c Makefile
3901 + @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
3902 + dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
3903 + @echo Compiling $*.c with -fPIC
3904 + @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -fPIC -c $(srcdir)/dynconfig.c -o $@
3905 +# -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@
3906 +
3907 +lib/version.o: lib/version.c include/version.h
3908 + @echo Compiling $*.c
3909 + @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -c $(srcdir)/lib/version.c -o $@
3910 +
3911 +lib/version.po: lib/version.c include/version.h
3912 + @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
3913 + dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
3914 + @echo Compiling $*.c with -fPIC
3915 + @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -fPIC -c $(srcdir)/lib/version.c -o $@
3916 +# -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@
3917 +
3918 +smbd/build_options.o: smbd/build_options.c Makefile include/config.h include/build_env.h include/proto.h
3919 + @echo Compiling $*.c
3920 + @$(CC) $(FLAGS) $(PATH_FLAGS) -c smbd/build_options.c -o $@
3921 +
3922 +smbd/build_options.c: include/config.h.in script/mkbuildoptions.awk
3923 + @echo Generating $@
3924 + @dir=smbd $(MAKEDIR) && $(AWK) -f $(srcdir)/script/mkbuildoptions.awk > $(builddir)/smbd/build_options.c < $(srcdir)/include/config.h.in
3925 +
3926 +.c.po:
3927 + @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
3928 + dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
3929 + @echo Compiling $*.c with -fPIC
3930 + @$(CC) -I. -I$(srcdir) $(FLAGS) -fPIC -c $< -o $*.po
3931 +# -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@
3932 +
3933 +bin/.dummy:
3934 + @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
3935 + dir=bin $(MAKEDIR); fi
3936 + @: >> $@ || : > $@ # what a fancy emoticon!
3937 +
3938 +bin/smbd: bin/libsmbd.a $(SMBD_OBJ_MAIN) bin/.dummy
3939 + @echo Linking $@
3940 + $(CC) $(FLAGS) -o $@ $(SMBD_OBJ_MAIN) $(LDFLAGS) \
3941 + $(AUTH_LIBS) \
3942 + -Lbin -lsmbd \
3943 + -L$(TARGETFS)/lib \
3944 + $(LIBS)
3945 +
3946 +bin/libsmbd.a: $(SMBD_OBJ_BASE)
3947 + $(AR) cru bin/libsmbd.a $(SMBD_OBJ_BASE)
3948 + $(RANLIB) bin/libsmbd.a
3949 +
3950 +
3951 +bin/nmbd: $(NMBD_OBJ) $(POPT_OBJS) bin/.dummy
3952 + @echo Linking $@
3953 + @$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS)
3954 +
3955 +
3956 +bin/swat: $(SWAT_OBJ) $(POPT_OBJS) bin/.dummy
3957 + @echo Linking $@
3958 + @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
3959 + $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS)
3960 +
3961 +bin/rpcclient: $(RPCCLIENT_OBJ) $(POPT_OBJS) bin/.dummy
3962 + @echo Linking $@
3963 + @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(PASSDB_LIBS) $(RPCCLIENT_OBJ) \
3964 + $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_OBJS) \
3965 + $(KRB5LIBS) $(LDAP_LIBS)
3966 +
3967 +bin/smbclient: $(CLIENT_OBJ) $(POPT_OBJS) bin/.dummy
3968 + @echo Linking $@
3969 + @$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS)
3970 +
3971 +bin/net: $(NET_OBJ) $(POPT_OBJS) bin/.dummy
3972 + @echo Linking $@
3973 + @$(CC) $(FLAGS) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS)
3974 +
3975 +bin/profiles: $(PROFILES_OBJ) $(POPT_OBJS) bin/.dummy
3976 + @echo Linking $@
3977 + @$(CC) $(FLAGS) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(POPT_OBJS)
3978 +
3979 +bin/smbspool: $(CUPS_OBJ) bin/.dummy
3980 + @echo Linking $@
3981 + @$(CC) $(FLAGS) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
3982 +
3983 +bin/smbmount: $(MOUNT_OBJ) bin/.dummy
3984 + @echo Linking $@
3985 + @$(CC) $(FLAGS) -o $@ $(MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
3986 +
3987 +bin/smbmnt: $(MNT_OBJ) bin/.dummy
3988 + @echo Linking $@
3989 + @$(CC) $(FLAGS) -o $@ $(MNT_OBJ) $(DYNEXP) $(LDFLAGS)
3990 +
3991 +bin/smbumount: $(UMOUNT_OBJ) bin/.dummy
3992 + @echo Linking $@
3993 + @$(CC) $(FLAGS) -o $@ $(UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS)
3994 +
3995 +bin/testparm: $(TESTPARM_OBJ) $(POPT_OBJS) bin/.dummy
3996 + @echo Linking $@
3997 + @$(CC) $(FLAGS) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS)
3998 +
3999 +bin/smbstatus: $(STATUS_OBJ) $(POPT_OBJS) bin/.dummy
4000 + @echo Linking $@
4001 + @$(CC) $(FLAGS) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
4002 + $(POPT_OBJS)
4003 +
4004 +bin/smbcontrol: $(SMBCONTROL_OBJ) $(POPT_OBJS) bin/.dummy
4005 + @echo Linking $@
4006 + @$(CC) -DUSING_SMBCONTROL $(FLAGS) -o $@ $(SMBCONTROL_OBJ) $(DYNEXP) \
4007 + $(LDFLAGS) $(LIBS) \
4008 + $(POPT_OBJS)
4009 +
4010 +bin/smbtree: $(SMBTREE_OBJ) $(POPT_OBJS) bin/.dummy
4011 + @echo Linking $@
4012 + @$(CC) $(FLAGS) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS)
4013 +
4014 +# bin/smbpasswd: $(SMBPASSWD_OBJ) bin/.dummy
4015 +# @echo Linking $@
4016 +# @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \
4017 +# $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4018 +
4019 +MY_PASS_OBJ = libsmb/smbdes.o lib/md4.o lib/arc4.o
4020 +
4021 +bin/smbpasswd: utils/avm_smbpasswd.o $(MY_PASS_OBJ)
4022 + @echo Linking $@
4023 + @$(CC) $(FLAGS) -o $@ utils/avm_smbpasswd.o $(MY_PASS_OBJ) \
4024 + -L$(TARGETFS)/lib
4025 +
4026 +
4027 +
4028 +bin/pdbedit: $(PDBEDIT_OBJ) $(POPT_OBJS) bin/.dummy
4029 + @echo Linking $@
4030 + @$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(PASSDB_LIBS) $(LDAP_LIBS)
4031 +
4032 +bin/smbget: $(SMBGET_OBJ) $(POPT_OBJS) bin/.dummy
4033 + @echo Linking $@
4034 + @$(CC) $(FLAGS) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS)
4035 +
4036 +bin/samtest: $(SAMTEST_OBJ) $(POPT_OBJS) bin/.dummy
4037 + @echo Linking $@
4038 + @$(CC) $(FLAGS) -o $@ $(SAMTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(PASSDB_LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4039 +
4040 +bin/nmblookup: $(NMBLOOKUP_OBJ) $(POPT_OBJS) bin/.dummy
4041 + @echo Linking $@
4042 + @$(CC) $(FLAGS) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(LDAP_LIBS)
4043 +
4044 +bin/smbtorture: $(SMBTORTURE_OBJ) bin/.dummy
4045 + @echo Linking $@
4046 + @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4047 +
4048 +bin/talloctort: $(TALLOCTORT_OBJ) bin/.dummy
4049 + @echo Linking $@
4050 + @$(CC) $(FLAGS) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
4051 +
4052 +bin/masktest: $(MASKTEST_OBJ) bin/.dummy
4053 + @echo Linking $@
4054 + @$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4055 +
4056 +bin/msgtest: $(MSGTEST_OBJ) bin/.dummy
4057 + @echo Linking $@
4058 + @$(CC) $(FLAGS) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4059 +
4060 +bin/smbcacls: $(SMBCACLS_OBJ) $(POPT_OBJS) bin/.dummy
4061 + @echo Linking $@
4062 + @$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS)
4063 +
4064 +bin/smbcquotas: $(SMBCQUOTAS_OBJ) $(POPT_OBJS) bin/.dummy
4065 + @echo Linking $@
4066 + @$(CC) $(FLAGS) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS)
4067 +
4068 +bin/locktest: $(LOCKTEST_OBJ) bin/.dummy
4069 + @echo Linking $@
4070 + @$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4071 +
4072 +bin/nsstest: $(NSSTEST_OBJ) bin/.dummy
4073 + @echo Linking $@
4074 + @$(CC) $(FLAGS) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4075 +
4076 +bin/vfstest: $(VFSTEST_OBJ) $(POPT_OBJS) bin/.dummy
4077 + @echo Linking $@
4078 + @$(CC) $(FLAGS) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) $(ACL_LIBS) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS)
4079 +
4080 +bin/smbiconv: $(SMBICONV_OBJ) $(POPT_OBJS) bin/.dummy
4081 + @echo Linking $@
4082 + @$(CC) $(FLAGS) -o $@ $(SMBICONV_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(DYNEXP) $(LIBS) $(POPT_OBJS)
4083 +
4084 +bin/log2pcap: $(LOG2PCAP_OBJ) $(POPT_OBJS) bin/.dummy
4085 + @echo Linking $@
4086 + @$(CC) $(FLAGS) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) $(POPT_OBJS) $(LIBS)
4087 +
4088 +bin/locktest2: $(LOCKTEST2_OBJ) bin/.dummy
4089 + @echo Linking $@
4090 + @$(CC) $(FLAGS) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4091 +
4092 +bin/rpctorture: $(RPCTORTURE_OBJ) bin/.dummy
4093 + @echo Linking $@
4094 + @$(CC) $(FLAGS) -o $@ $(RPCTORTURE_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4095 +
4096 +bin/debug2html: $(DEBUG2HTML_OBJ) bin/.dummy
4097 + @echo Linking $@
4098 + @$(CC) $(FLAGS) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
4099 +
4100 +bin/smbfilter: $(SMBFILTER_OBJ) bin/.dummy
4101 + @echo Linking $@
4102 + @$(CC) $(FLAGS) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4103 +
4104 +bin/smbw_sample: $(SMBW_OBJ) utils/smbw_sample.o bin/.dummy
4105 + @echo Linking $@
4106 + @$(CC) $(FLAGS) -o $@ $(SMBW_OBJ) utils/smbw_sample.o $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
4107 +
4108 +bin/smbsh: $(SMBSH_OBJ) bin/.dummy
4109 + @echo Linking $@
4110 + @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
4111 +
4112 +bin/smbwrapper.so: $(PICOBJS) bin/.dummy
4113 + @echo Linking shared library $@
4114 + @$(SHLD) $(LDSHFLAGS) -o $@ $(PICOBJS) $(LIBS) \
4115 + $(KRB5LIBS) $(LDAP_LIBS) \
4116 + -Wl,-soname=`basename $@`
4117 +
4118 +bin/libsmbclient.so: $(LIBSMBCLIENT_PICOBJS)
4119 + @echo Linking libsmbclient shared library $@
4120 + @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(LDFLAGS) $(LIBS) \
4121 + $(KRB5LIBS) $(LDAP_LIBS) \
4122 + -Wl,-soname=`basename $@`.$(LIBSMBCLIENT_MAJOR)
4123 +
4124 +bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS)
4125 + @echo Linking libsmbclient non-shared library $@
4126 + @-$(AR) -rc $@ $(LIBSMBCLIENT_PICOBJS)
4127 +
4128 +bin/libsmbsharemodes.so: $(LIBSMBSHAREMODES_PICOBJS)
4129 + @echo Linking libsmbsharemodes shared library $@
4130 + @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBSHAREMODES_PICOBJS) $(LDFLAGS) $(LIBS) \
4131 + $(KRB5LIBS) $(LDAP_LIBS) \
4132 + -Wl,-soname=`basename $@`.$(LIBSMBSHAREMODES_MAJOR)
4133 +
4134 +bin/libsmbsharemodes.a: $(LIBSMBSHAREMODES_PICOBJS)
4135 + @echo Linking libsmbsharemodes non-shared library $@
4136 + @-$(AR) -rc $@ $(LIBSMBSHAREMODES_PICOBJS)
4137 +
4138 +# This is probably wrong for anything other than the GNU linker.
4139 +bin/libbigballofmud.so: $(LIBBIGBALLOFMUD_PICOBJS)
4140 + @echo Linking bigballofmud shared library $@
4141 + @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBBIGBALLOFMUD_PICOBJS) $(LIBS) \
4142 + $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
4143 + -Wl,-soname=`basename $@`.$(LIBBIGBALLOFMUD_MAJOR)
4144 + ln -snf libbigballofmud.so bin/libbigballofmud.so.0
4145 +
4146 +# It would be nice to build a static bigballofmud too, but when I try
4147 +# I get linker errors about dl_open and similar things. I'm not sure if
4148 +# it can be fixed or if they just can't be called from a static
4149 +# library.
4150 +
4151 +libsmbclient: $(LIBSMBCLIENT)
4152 +libsmbsharemodes: $(LIBSMBSHAREMODES)
4153 +
4154 +bin/librpc_lsarpc.so: $(RPC_LSA_OBJ)
4155 + @echo "Linking $@"
4156 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_LSA_OBJ) -lc \
4157 + -Wl,-soname=`basename $@`
4158 +
4159 +bin/librpc_samr.so: $(RPC_SAMR_OBJ)
4160 + @echo "Linking $@"
4161 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SAMR_OBJ) -lc \
4162 + -Wl,-soname=`basename $@`
4163 +
4164 +bin/librpc_srvsvc.so: $(RPC_SVC_OBJ)
4165 + @echo "Linking $@"
4166 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SVC_OBJ) -lc \
4167 + -Wl,-soname=`basename $@`
4168 +
4169 +bin/librpc_svcctl.so: $(RPC_SVCCTL_OBJ)
4170 + @echo "Linking $@"
4171 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SVCCTL_OBJ) -lc \
4172 + -Wl,-soname=`basename $@`
4173 +
4174 +bin/librpc_wkssvc.so: $(RPC_WKS_OBJ)
4175 + @echo "Linking $@"
4176 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_WKS_OBJ) -lc \
4177 + -Wl,-soname=`basename $@`
4178 +
4179 +bin/librpc_NETLOGON.so: $(RPC_NETLOG_OBJ)
4180 + @echo "Linking $@"
4181 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_NETLOG_OBJ) -lc \
4182 + -Wl,-soname=`basename $@`
4183 +
4184 +bin/librpc_winreg.so: $(RPC_REG_OBJ)
4185 + @echo "Linking $@"
4186 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_REG_OBJ) -lc \
4187 + -Wl,-soname=`basename $@`
4188 +
4189 +bin/librpc_lsa_ds.so: $(RPC_LSA_DS_OBJ)
4190 + @echo "Linking $@"
4191 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_LSA_DS_OBJ) -lc \
4192 + -Wl,-soname=`basename $@`
4193 +
4194 +bin/librpc_spoolss.so: $(RPC_SPOOLSS_OBJ)
4195 + @echo "Linking $@"
4196 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SPOOLSS_OBJ) -lc \
4197 + -Wl,-soname=`basename $@`
4198 +
4199 +bin/librpc_eventlog.so: $(RPC_EVENTLOG_OBJ)
4200 + @echo "Linking $@"
4201 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_EVENTLOG_OBJ) -lc \
4202 + -Wl,-soname=`basename $@`
4203 +
4204 +bin/librpc_netdfs.so: $(RPC_DFS_OBJ)
4205 + @echo "Linking $@"
4206 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_DFS_OBJ) -lc \
4207 + -Wl,-soname=`basename $@`
4208 +
4209 +bin/librpc_echo.so: $(RPC_ECHO_OBJ)
4210 + @echo "Linking $@"
4211 + @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_ECHO_OBJ) -lc \
4212 + -Wl,-soname=`basename $@`
4213 +
4214 +bin/winbindd: $(WINBINDD_OBJ) $(POPT_OBJS) bin/.dummy
4215 + @echo "Linking $@"
4216 + @$(CC) $(FLAGS) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
4217 + $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS)
4218 +
4219 +# Please don't add .o files to libnss_winbind, libnss_wins, or the pam_winbind
4220 +# libraries. Add to the appropriate PICOBJ variable instead.
4221 +
4222 +nsswitch/libnss_winbind.so: $(WINBIND_NSS_PICOBJS)
4223 + @echo "Linking $@"
4224 + @$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_PICOBJS) \
4225 + -Wl,-soname=`basename $@`
4226 +
4227 +nsswitch/libnss_wins.so: $(WINBIND_WINS_NSS_PICOBJS)
4228 + @echo "Linking $@"
4229 + @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_PICOBJS) \
4230 + $(LDAP_LIBS) $(KRB5LIBS) -lc \
4231 + -Wl,-soname=`basename $@`
4232 +
4233 +nsswitch/pam_winbind.so: $(PAM_WINBIND_PICOBJ) bin/.dummy
4234 + @echo "Linking $@"
4235 + @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_PICOBJ) \
4236 + -Wl,-soname=`basename $@` -lpam
4237 +
4238 +bin/rhosts.so: $(AUTH_RHOSTS_OBJ:.o=.po)
4239 + @echo "Building plugin $@"
4240 + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_RHOSTS_OBJ:.o=.po) -Wl,-soname=`basename $@`
4241 +
4242 +bin/builtin.so: $(AUTH_BUILTIN_OBJ:.o=.po)
4243 + @echo "Building plugin $@"
4244 + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_BUILTIN_OBJ:.o=.po) -Wl,-soname=`basename $@`
4245 +
4246 +bin/domain.so: $(AUTH_DOMAIN_OBJ:.o=.po)
4247 + @echo "Building plugin $@"
4248 + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_DOMAIN_OBJ:.o=.po) -Wl,-soname=`basename $@`
4249 +
4250 +bin/smbserver.so: $(AUTH_SERVER_OBJ:.o=.po)
4251 + @echo "Building plugin $@"
4252 + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SERVER_OBJ:.o=.po) -Wl,-soname=`basename $@`
4253 +
4254 +bin/winbind.so: $(AUTH_WINBIND_OBJ:.o=.po)
4255 + @echo "Building plugin $@"
4256 + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_WINBIND_OBJ:.o=.po) -Wl,-soname=`basename $@`
4257 +
4258 +bin/unix.so: $(AUTH_UNIX_OBJ:.o=.po)
4259 + @echo "Building plugin $@"
4260 + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_UNIX_OBJ:.o=.po) -Wl,-soname=`basename $@`
4261 +
4262 +bin/sam.so: $(AUTH_SAM_OBJ:.o=.po)
4263 + @echo "Building plugin $@"
4264 + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SAM_OBJ:.o=.po) -Wl,-soname=`basename $@`
4265 +
4266 +bin/mysql.so: $(MYSQL_OBJ:.o=.po)
4267 + @echo "Building plugin $@"
4268 + @$(SHLD) $(LDSHFLAGS) -o $@ $(MYSQL_OBJ:.o=.po) \
4269 + -Wl,-soname=`basename $@`
4270 +
4271 +bin/pgsql.so: $(PGSQL_OBJ:.o=.po)
4272 + @echo "Building plugin $@"
4273 + @$(SHLD) $(LDSHFLAGS) -o $@ $(PGSQL_OBJ:.o=.po) \
4274 + -Wl,-soname=`basename $@`
4275 +
4276 +bin/ldapsam.so: passdb/pdb_ldap.po
4277 + @echo "Building plugin $@"
4278 + @$(SHLD) $(LDSHFLAGS) $(LDAP_LIBS) -o $@ passdb/pdb_ldap.po \
4279 + -Wl,-soname=`basename $@`
4280 +
4281 +bin/tdbsam.so: passdb/pdb_tdb.po
4282 + @echo "Building plugin $@"
4283 + @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_tdb.po \
4284 + -Wl,-soname=`basename $@`
4285 +
4286 +bin/smbpasswd.so: passdb/pdb_smbpasswd.po
4287 + @echo "Building plugin $@"
4288 + @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_smbpasswd.po \
4289 + -Wl,-soname=`basename $@`
4290 +
4291 +bin/idmap_rid.so: sam/idmap_rid.po
4292 + @echo "Building plugin $@"
4293 + @$(SHLD) $(LDSHFLAGS) -o $@ sam/idmap_rid.po \
4294 + -Wl,-soname=`basename $@`
4295 +
4296 +bin/idmap_ad.so: sam/idmap_ad.po
4297 + @echo "Building plugin $@"
4298 + @$(SHLD) $(LDSHFLAGS) -o $@ sam/idmap_ad.po \
4299 + -Wl,-soname=`basename $@`
4300 +
4301 +bin/weird.so: $(DEVEL_HELP_WEIRD_OBJ:.o=.po)
4302 + @echo "Building plugin $@"
4303 + @$(SHLD) $(LDSHFLAGS) -o $@ $(DEVEL_HELP_WEIRD_OBJ:.o=.po) \
4304 + -Wl,-soname=`basename $@`
4305 +
4306 +bin/CP850.so: $(CP850_OBJ:.o=.po)
4307 + @echo "Building plugin $@"
4308 + @$(SHLD) $(LDSHFLAGS) -o $@ $(CP850_OBJ:.o=.po) \
4309 + -Wl,-soname=`basename $@`
4310 +
4311 +bin/CP437.so: $(CP437_OBJ:.o=.po)
4312 + @echo "Building plugin $@"
4313 + @$(SHLD) $(LDSHFLAGS) -o $@ $(CP437_OBJ:.o=.po) \
4314 + -Wl,-soname=`basename $@`
4315 +
4316 +bin/macosxfs.so: $(CHARSET_MACOSXFS_OBJ:.o=.po)
4317 + @echo "Building plugin $@"
4318 + @$(SHLD) $(LDSHFLAGS) -o $@ $(CHARSET_MACOSXFS_OBJ:.o=.po) \
4319 + -framework CoreFoundation -Wl,-soname=`basename $@`
4320 +
4321 +bin/xml.so: $(XML_OBJ:.o=.po)
4322 + @echo "Building plugin $@"
4323 + @$(SHLD) $(LDSHFLAGS) -o $@ $(XML_OBJ:.o=.po) \
4324 + -Wl,-soname=`basename $@`
4325 +
4326 +bin/audit.so: $(VFS_AUDIT_OBJ:.o=.po)
4327 + @echo "Building plugin $@"
4328 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AUDIT_OBJ:.o=.po) \
4329 + -Wl,-soname=`basename $@`
4330 +
4331 +bin/extd_audit.so: $(VFS_EXTD_AUDIT_OBJ:.o=.po)
4332 + @echo "Building plugin $@"
4333 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_EXTD_AUDIT_OBJ:.o=.po) \
4334 + -Wl,-soname=`basename $@`
4335 +
4336 +bin/full_audit.so: $(VFS_FULL_AUDIT_OBJ:.o=.po)
4337 + @echo "Building plugin $@"
4338 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_FULL_AUDIT_OBJ:.o=.po) \
4339 + -Wl,-soname=`basename $@`
4340 +
4341 +bin/recycle.so: $(VFS_RECYCLE_OBJ:.o=.po)
4342 + @echo "Building plugin $@"
4343 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_RECYCLE_OBJ:.o=.po) \
4344 + -Wl,-soname=`basename $@`
4345 +
4346 +bin/netatalk.so: $(VFS_NETATALK_OBJ:.o=.po)
4347 + @echo "Building plugin $@"
4348 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_NETATALK_OBJ:.o=.po) \
4349 + -Wl,-soname=`basename $@`
4350 +
4351 +bin/fake_perms.so: $(VFS_FAKE_PERMS_OBJ:.o=.po)
4352 + @echo "Building plugin $@"
4353 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_FAKE_PERMS_OBJ:.o=.po) \
4354 + -Wl,-soname=`basename $@`
4355 +
4356 +bin/default_quota.so: $(VFS_DEFAULT_QUOTA_OBJ:.o=.po)
4357 + @echo "Building plugin $@"
4358 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_DEFAULT_QUOTA_OBJ:.o=.po) \
4359 + -Wl,-soname=`basename $@`
4360 +
4361 +bin/readonly.so: $(VFS_READONLY_OBJ:.o=.po)
4362 + @echo "Building plugin $@"
4363 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_READONLY_OBJ:.o=.po) \
4364 + -Wl,-soname=`basename $@`
4365 +
4366 +bin/shadow_copy.so: $(VFS_SHADOW_COPY_OBJ:.o=.po)
4367 + @echo "Building plugin $@"
4368 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_SHADOW_COPY_OBJ:.o=.po) \
4369 + -Wl,-soname=`basename $@`
4370 +
4371 +bin/cap.so: $(VFS_CAP_OBJ:.o=.po)
4372 + @echo "Building plugin $@"
4373 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_CAP_OBJ:.o=.po) \
4374 + -Wl,-soname=`basename $@`
4375 +
4376 +bin/expand_msdfs.so: $(VFS_EXPAND_MSDFS_OBJ:.o=.po)
4377 + @echo "Building plugin $@"
4378 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_EXPAND_MSDFS_OBJ:.o=.po) \
4379 + -Wl,-soname=`basename $@`
4380 +
4381 +bin/afsacl.so: $(VFS_AFSACL_OBJ:.o=.po)
4382 + @echo "Building plugin $@"
4383 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AFSACL_OBJ:.o=.po) \
4384 + -Wl,-soname=`basename $@`
4385 +
4386 +bin/catia.so: $(VFS_CATIA_OBJ:.o=.po)
4387 + @echo "Building plugin $@"
4388 + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_CATIA_OBJ:.o=.po) \
4389 + -Wl,-soname=`basename $@`
4390 +
4391 +
4392 +bin/wbinfo: $(WBINFO_OBJ) $(POPT_OBJS) bin/.dummy
4393 + @echo Linking $@
4394 + @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) $(POPT_OBJS)
4395 +
4396 +bin/ntlm_auth: $(NTLM_AUTH_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
4397 + $(POPT_OBJS) bin/.dummy
4398 + @echo Linking $@
4399 + @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \
4400 + $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) \
4401 + $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS)
4402 +
4403 +bin/pam_smbpass.so: $(PAM_SMBPASS_PICOOBJ)
4404 + @echo "Linking shared library $@"
4405 + @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_PICOOBJ) -lpam $(DYNEXP) $(LIBS) -lc $(LDAP_LIBS) $(KRB5LIBS)
4406 +
4407 +bin/libmsrpc.a: $(LIBMSRPC_PICOBJ)
4408 + @-$(AR) -rc $@ $(LIBMSRPC_PICOBJ)
4409 +
4410 +bin/tdbbackup: $(TDBBACKUP_OBJ) bin/.dummy
4411 + @echo Linking $@
4412 + @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(LIBS) $(TDBBACKUP_OBJ)
4413 +
4414 +bin/tdbtool: $(TDBTOOL_OBJ) bin/.dummy
4415 + @echo Linking $@
4416 + @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(LIBS) $(TDBTOOL_OBJ)
4417 +
4418 +bin/tdbdump: $(TDBDUMP_OBJ) bin/.dummy
4419 + @echo Linking $@
4420 + @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(LIBS) $(TDBDUMP_OBJ)
4421 +
4422 +bin/t_strcmp: bin/libbigballofmud.so torture/t_strcmp.o
4423 + $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_strcmp.o -L ./bin -lbigballofmud
4424 +
4425 +bin/t_strstr: bin/libbigballofmud.so torture/t_strstr.o
4426 + $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_strstr.o -L ./bin -lbigballofmud
4427 +
4428 +bin/t_stringoverflow: bin/libbigballofmud.so torture/t_stringoverflow.o
4429 + $(CC) $(FLAGS) -o $@ $(DYNEXP) torture/t_stringoverflow.o -L./bin -lbigballofmud
4430 +
4431 +bin/t_doschar: bin/libbigballofmud.so torture/t_doschar.o
4432 + $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_doschar.o -L ./bin -lbigballofmud
4433 +bin/t_push_ucs2: bin/libbigballofmud.so torture/t_push_ucs2.o
4434 + $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_push_ucs2.o -L ./bin -lbigballofmud
4435 +
4436 +bin/t_snprintf: lib/snprintf.c
4437 + $(CC) $(FLAGS) -o $@ $(DYNEXP) -DTEST_SNPRINTF lib/snprintf.c -lm
4438 +install: installbin installman installscripts installdat installswat installmodules installclientlib
4439 +
4440 +install-everything: install installmodules
4441 +
4442 +# DESTDIR is used here to prevent packagers wasting their time
4443 +# duplicating the Makefile. Remove it and you will have the privelege
4444 +# of package each samba release for muliple versions of multiple
4445 +# distributions and operating systems, or at least supplying patches
4446 +# to all the packaging files required for this, prior to committing
4447 +# the removal of DESTDIR. Do not remove it even though you think it
4448 +# is not used
4449 +
4450 +installdirs:
4451 + @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(PRIVATEDIR) $(DESTDIR)$(PIDDIR) $(DESTDIR)$(LOCKDIR) $(DESTDIR)$(MANDIR)
4452 +
4453 +installservers: all installdirs
4454 + @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SBIN_PROGS)
4455 +
4456 +installbin: all installdirs
4457 + @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SBIN_PROGS)
4458 + @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(BIN_PROGS)
4459 +
4460 +
4461 +# Some symlinks are required for the 'probing' of modules.
4462 +# This mechanism should go at some point..
4463 +installmodules: modules installdirs
4464 + @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(VFSLIBDIR) $(VFS_MODULES)
4465 + @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(PDBLIBDIR) $(PDB_MODULES)
4466 + @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(RPCLIBDIR) $(RPC_MODULES)
4467 + @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(IDMAPLIBDIR) $(IDMAP_MODULES)
4468 + @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(CHARSETLIBDIR) $(CHARSET_MODULES)
4469 + @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(AUTHLIBDIR) $(AUTH_MODULES)
4470 + @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.so ldapsam_compat.so
4471 + @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) rhosts.so hostsequiv.so
4472 + @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) sam.so sam_ignoredomain.so
4473 + @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) domain.so trustdomain.so ntdomain.so
4474 + @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) builtin.so guest.so fixed_challenge.so name_to_ntstatus.so
4475 +
4476 +installscripts: installdirs
4477 + @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(DESTDIR)$(BINDIR) $(SCRIPTS)
4478 +
4479 +installdat: installdirs
4480 + @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(LIBDIR) $(srcdir)
4481 +
4482 +installmsg: installdirs
4483 + @$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR)$(LIBDIR) $(srcdir)
4484 +
4485 +installswat: installdirs installmsg
4486 + @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
4487 +
4488 +installclientlib: installdirs libsmbclient
4489 + @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(LIBDIR)
4490 + -$(INSTALLCLIENTCMD_SH) bin/libsmbclient.so $(DESTDIR)$(LIBDIR)
4491 + -$(INSTALLCLIENTCMD_A) bin/libsmbclient.a $(DESTDIR)$(LIBDIR)
4492 + @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)${prefix}/include
4493 + -$(INSTALLCMD) $(srcdir)/include/libsmbclient.h $(DESTDIR)${prefix}/include
4494 +
4495 +# Python extensions
4496 +
4497 +PYTHON_OBJS = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) $(RPC_PARSE_OBJ) \
4498 + $(LIBMSRPC_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
4499 + $(SECRETS_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ)
4500 +
4501 +PYTHON_PICOBJS = $(PYTHON_OBJS:.o=.po)
4502 +
4503 +python_ext: $(PYTHON_PICOBJS)
4504 + @if test -z "$(PYTHON)"; then \
4505 + echo Use the option --with-python to configure python; \
4506 + exit 1; \
4507 + fi
4508 + PYTHON_OBJS="$(PYTHON_PICOBJS)" \
4509 + PYTHON_CFLAGS="$(CFLAGS) $(CPPFLAGS) $(FLAGS)" \
4510 + LIBS="$(LDFLAGS) $(LIBS) $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS)" \
4511 + $(PYTHON) python/setup.py build
4512 +
4513 +python_install: $(PYTHON_PICOBJS)
4514 + @if test -z "$(PYTHON)"; then \
4515 + echo Use the option --with-python to configure python; \
4516 + exit 1; \
4517 + fi
4518 + PYTHON_OBJS="$(PYTHON_PICOBJS)" \
4519 + PYTHON_CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
4520 + LIBS="$(LDFLAGS) $(LIBS)" \
4521 + $(PYTHON) python/setup.py install
4522 +
4523 +python_clean:
4524 + @-if test -n "$(PYTHON)"; then $(PYTHON) python/setup.py clean; fi
4525 +
4526 +# revert to the previously installed version
4527 +revert:
4528 + @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS)
4529 + @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(BIN_PROGS) $(SCRIPTS)
4530 +
4531 +installman: installdirs
4532 + @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) C ""
4533 +
4534 +.PHONY: showlayout
4535 +
4536 +showlayout:
4537 + @echo "Samba will be installed into:"
4538 + @echo " basedir: $(BASEDIR)"
4539 + @echo " bindir: $(BINDIR)"
4540 + @echo " sbindir: $(SBINDIR)"
4541 + @echo " libdir: $(LIBDIR)"
4542 + @echo " vardir: $(VARDIR)"
4543 + @echo " mandir: $(MANDIR)"
4544 + @echo " privatedir: $(PRIVATE_DIR)"
4545 + @echo " configdir: $(CONFIGDIR)"
4546 + @echo " lockdir: $(LOCKDIR)"
4547 + @echo " piddir: $(PIDDIR)"
4548 + @echo " swatdir: $(SWATDIR)"
4549 +
4550 +
4551 +uninstall: uninstallman uninstallbin uninstallscripts uninstallmodules
4552 +
4553 +uninstallman:
4554 + @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C
4555 +
4556 +uninstallbin:
4557 + @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(SBIN_PROGS)
4558 + @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(BIN_PROGS)
4559 +
4560 +uninstallmodules:
4561 + @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(VFSLIBDIR) $(DESTDIR)$(VFS_MODULES)
4562 + @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(PDBLIBDIR) $(DESTDIR)$(PDB_MODULES)
4563 + @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(RPCLIBDIR) $(DESTDIR)$(RPC_MODULES)
4564 + @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(CHARSETLIBDIR) $(DESTDIR)$(CHARSET_MODULES)
4565 + @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(AUTHLIBDIR) $(DESTDIR)$(AUTH_MODULES)
4566 +
4567 +uninstallscripts:
4568 + @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS) $(DESTDIR)$(BINDIR) $(SCRIPTS)
4569 +
4570 +# Toplevel clean files
4571 +TOPFILES=dynconfig.o dynconfig.po
4572 +
4573 +clean: delheaders python_clean
4574 + -rm -f core */*~ *~ */*.o */*.po */*.so \
4575 + $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(MODULES) $(TORTURE_PROGS) \
4576 + $(LIBSMBCLIENT) $(LIBSMBSHAREMODES) $(EVERYTHING_PROGS) .headers.stamp
4577 + -rm -rf t_dir
4578 + -rm -rf bin/lib*
4579 + -find . -name *.o | xargs rm -f
4580 + -find . -name *.po | xargs rm -f
4581 + -find . -name *.so | xargs rm -f
4582 +
4583 +# Making this target will just make sure that the prototype files
4584 +# exist, not necessarily that they are up to date. Since they're
4585 +# removed by "make clean" this will always be run when you do anything
4586 +# afterwards.
4587 +proto_exists: include/proto.h include/build_env.h \
4588 + nsswitch/winbindd_proto.h web/swat_proto.h \
4589 + client/client_proto.h utils/net_proto.h utils/ntlm_auth_proto.h
4590 +
4591 +# AR7 smbd/build_options.c
4592 +
4593 +delheaders:
4594 + @echo Removing prototype headers
4595 + @rm -f include/proto.h include/build_env.h \
4596 + nsswitch/winbindd_proto.h web/swat_proto.h \
4597 + client/client_proto.h utils/net_proto.h \
4598 + smbd/build_options.c
4599 +
4600 +MKPROTO_SH = $(srcdir)/script/mkproto.sh
4601 +
4602 +# AR7 include/proto.h: smbd/build_options.c
4603 +
4604 +include/proto.h:
4605 + @echo Building include/proto.h
4606 + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
4607 + -h _PROTO_H_ $(builddir)/include/proto.h \
4608 + $(PROTO_OBJ)
4609 +
4610 +include/build_env.h: script/build_env.sh
4611 + @echo Building include/build_env.h
4612 + @$(SHELL) $(srcdir)/script/build_env.sh $(srcdir) $(builddir) $(CC) \
4613 + > $(builddir)/include/build_env.h
4614 +
4615 +nsswitch/winbindd_proto.h:
4616 + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
4617 + -h _WINBINDD_PROTO_H_ $(builddir)/nsswitch/winbindd_proto.h \
4618 + $(WINBINDD_OBJ1)
4619 +
4620 +web/swat_proto.h:
4621 + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
4622 + -h _SWAT_PROTO_H_ $(builddir)/web/swat_proto.h \
4623 + $(SWAT_OBJ1)
4624 +
4625 +client/client_proto.h:
4626 + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
4627 + -h _CLIENT_PROTO_H_ $(builddir)/client/client_proto.h \
4628 + $(CLIENT_OBJ1)
4629 +
4630 +utils/net_proto.h:
4631 + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
4632 + -h _NET_PROTO_H_ $(builddir)/utils/net_proto.h \
4633 + $(NET_OBJ1)
4634 +
4635 +utils/ntlm_auth_proto.h:
4636 + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
4637 + -h _NTLM_AUTH_PROTO_H_ $(builddir)/utils/ntlm_auth_proto.h \
4638 + $(NTLM_AUTH_OBJ1)
4639 +
4640 +# "make headers" or "make proto" calls a subshell because we need to
4641 +# make sure these commands are executed in sequence even for a
4642 +# parallel make.
4643 +headers:
4644 + $(MAKE) delheaders; \
4645 + $(MAKE) smbd/build_options.c; \
4646 + $(MAKE) include/proto.h; \
4647 + $(MAKE) include/build_env.h; \
4648 + $(MAKE) nsswitch/winbindd_proto.h; \
4649 + $(MAKE) web/swat_proto.h; \
4650 + $(MAKE) client/client_proto.h; \
4651 + $(MAKE) utils/ntlm_auth_proto.h; \
4652 + $(MAKE) utils/net_proto.h;
4653 +
4654 +proto: headers
4655 +
4656 +.PHONY: headers proto
4657 +
4658 +etags:
4659 + etags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
4660 +
4661 +ctags:
4662 + ctags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
4663 +
4664 +realclean: clean delheaders
4665 + -rm -f config.log bin/.dummy script/findsmb
4666 +
4667 +distclean: realclean
4668 + -rm -f include/stamp-h
4669 + -rm -f include/config.h Makefile
4670 + -rm -f config.status config.cache so_locations
4671 + -rm -rf .deps TAGS
4672 +
4673 +realdistclean: distclean
4674 + -rm -f include/config.h.in
4675 + -rm -f include/version.h
4676 + -rm -f configure
4677 +
4678 +# this target is really just for my use. It only works on a limited
4679 +# range of machines and is used to produce a list of potentially
4680 +# dead (ie. unused) functions in the code. (tridge)
4681 +finddead:
4682 + nm */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
4683 + nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
4684 + comm -13 nmused.txt nmfns.txt
4685 +
4686 +
4687 +# when configure.in is updated, reconfigure
4688 +$(srcdir)/configure: $(srcdir)/configure.in
4689 + @echo "WARNING: you need to rerun ./autogen.sh"
4690 +
4691 +config.status: $(srcdir)/configure
4692 + @echo "WARNING: you need to run ./configure"
4693 +
4694 +# AR7 Makefile: $(srcdir)/Makefile.in config.status
4695 +# AR7 @echo "WARNING: you need to run ./config.status"
4696 +
4697 +######################################################################
4698 +# Samba Testing Framework
4699 +
4700 +# FIXME: LD_LIBRARY_PATH is not portable, but in the absence of
4701 +# libtool I don't know a better way to do it. Perhaps we should fix
4702 +# libbigballofmud to link statically?
4703 +##
4704 +## not working...to be replaced by 'make test' --jerry
4705 +##
4706 +#check: check-programs
4707 +# LD_LIBRARY_PATH="`pwd`/bin:$$LD_LIBRARY_PATH" \
4708 +# PATH="`pwd`/bin:$$PATH" \
4709 +# python stf/standardcheck.py; \
4710 +# if test -n "$(PYTHON)"; then \
4711 +# python stf/pythoncheck.py; \
4712 +# fi
4713 +
4714 +# These are called by the test suite and need to be built before
4715 +# running it. For the time being we don't build all of BIN_PROGS,
4716 +# because they're not all needed.
4717 +check-programs: bin/t_strcmp bin/t_strstr bin/t_push_ucs2 bin/smbcontrol bin/t_snprintf
4718 +
4719 +test: all
4720 + @if test -z "$(SMB4TORTURE)"; then \
4721 + echo "Please set the SMB4TORTURE environment variable"; \
4722 + exit 1; \
4723 + fi
4724 + ./script/smb4torture.sh `pwd`/prefix-test $(SMB4TORTURE)
4725 diff -urN samba-3.0.24.orig/source/passdb/lookup_sid.c samba-3.0.24/source/passdb/lookup_sid.c
4726 --- samba-3.0.24.orig/source/passdb/lookup_sid.c 2007-02-04 19:59:21.000000000 +0100
4727 +++ samba-3.0.24/source/passdb/lookup_sid.c 2007-08-07 09:38:18.000000000 +0200
4728 @@ -421,10 +421,10 @@
4729 return False;
4730 }
4731
4732 - become_root_uid_only();
4733 + become_root();
4734 result = pdb_lookup_rids(domain_sid, num_rids, rids,
4735 *names, *types);
4736 - unbecome_root_uid_only();
4737 + unbecome_root();
4738
4739 return (NT_STATUS_IS_OK(result) ||
4740 NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED) ||
4741 @@ -1085,9 +1085,9 @@
4742 goto done;
4743 }
4744
4745 - become_root_uid_only();
4746 + become_root();
4747 ret = pdb_uid_to_rid(uid, &rid);
4748 - unbecome_root_uid_only();
4749 + unbecome_root();
4750
4751 if (ret) {
4752 /* This is a mapped user */
4753 @@ -1131,9 +1131,9 @@
4754 goto done;
4755 }
4756
4757 - become_root_uid_only();
4758 + become_root();
4759 ret = pdb_gid_to_sid(gid, psid);
4760 - unbecome_root_uid_only();
4761 + unbecome_root();
4762
4763 if (ret) {
4764 /* This is a mapped group */
4765 @@ -1179,9 +1179,9 @@
4766 union unid_t id;
4767 BOOL ret;
4768
4769 - become_root_uid_only();
4770 + become_root();
4771 ret = pdb_sid_to_id(psid, &id, &type);
4772 - unbecome_root_uid_only();
4773 + unbecome_root();
4774
4775 if (ret) {
4776 if (type != SID_NAME_USER) {
4777 @@ -1259,9 +1259,9 @@
4778 sid_check_is_in_wellknown_domain(psid))) {
4779 BOOL ret;
4780
4781 - become_root_uid_only();
4782 + become_root();
4783 ret = pdb_getgrsid(&map, *psid);
4784 - unbecome_root_uid_only();
4785 + unbecome_root();
4786
4787 if (ret) {
4788 *pgid = map.gid;
4789 @@ -1273,9 +1273,9 @@
4790 if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) {
4791 BOOL ret;
4792
4793 - become_root_uid_only();
4794 + become_root();
4795 ret = pdb_sid_to_id(psid, &id, &type);
4796 - unbecome_root_uid_only();
4797 + unbecome_root();
4798
4799 if (ret) {
4800 if ((type != SID_NAME_DOM_GRP) &&
4801 diff -urN samba-3.0.24.orig/source/printing/nt_printing.c samba-3.0.24/source/printing/nt_printing.c
4802 --- samba-3.0.24.orig/source/printing/nt_printing.c 2007-02-04 20:09:01.000000000 +0100
4803 +++ samba-3.0.24/source/printing/nt_printing.c 2007-08-07 09:38:18.000000000 +0200
4804 @@ -2984,11 +2984,15 @@
4805 return True;
4806 }
4807
4808 +/*****************************************************************
4809 + ****************************************************************/
4810 +
4811 static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2,
4812 struct uuid guid)
4813 {
4814 int i;
4815 REGVAL_CTR *ctr=NULL;
4816 + UNISTR2 unistr_guid;
4817
4818 /* find the DsSpooler key */
4819 if ((i = lookup_printerkey(info2->data, SPOOL_DSSPOOLER_KEY)) < 0)
4820 @@ -2996,8 +3000,18 @@
4821 ctr = info2->data->keys[i].values;
4822
4823 regval_ctr_delvalue(ctr, "objectGUID");
4824 - regval_ctr_addvalue(ctr, "objectGUID", REG_BINARY,
4825 - (char *) &guid, sizeof(struct uuid));
4826 +
4827 + /* We used to store this as a REG_BINARY but that causes
4828 + Vista to whine */
4829 +
4830 + ZERO_STRUCT( unistr_guid );
4831 + init_unistr2( &unistr_guid, smb_uuid_string_static(guid),
4832 + UNI_STR_TERMINATE );
4833 +
4834 + regval_ctr_addvalue(ctr, "objectGUID", REG_SZ,
4835 + (char *)unistr_guid.buffer,
4836 + unistr_guid.uni_max_len*2);
4837 +
4838 }
4839
4840 static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
4841 @@ -3254,6 +3268,7 @@
4842 REGISTRY_VALUE *guid_val;
4843 WERROR win_rc;
4844 int i;
4845 + BOOL ret = False;
4846
4847 win_rc = get_a_printer(print_hnd, &printer, 2, lp_servicename(snum));
4848
4849 @@ -3267,12 +3282,36 @@
4850 return False;
4851 }
4852
4853 - /* fetching printer guids really ought to be a separate function.. */
4854 - if (guid && regval_size(guid_val) == sizeof(struct uuid))
4855 - memcpy(guid, regval_data_p(guid_val), sizeof(struct uuid));
4856 + /* fetching printer guids really ought to be a separate function. */
4857 +
4858 + if ( guid ) {
4859 + fstring guid_str;
4860 +
4861 + /* We used to store the guid as REG_BINARY, then swapped
4862 + to REG_SZ for Vista compatibility so check for both */
4863 +
4864 + switch ( regval_type(guid_val) ){
4865 + case REG_SZ:
4866 + rpcstr_pull( guid_str, regval_data_p(guid_val),
4867 + sizeof(guid_str)-1, -1, STR_TERMINATE );
4868 + ret = smb_string_to_uuid( guid_str, guid );
4869 + break;
4870 + case REG_BINARY:
4871 + if ( regval_size(guid_val) != sizeof(struct uuid) ) {
4872 + ret = False;
4873 + break;
4874 + }
4875 + memcpy(guid, regval_data_p(guid_val), sizeof(struct uuid));
4876 + break;
4877 + default:
4878 + DEBUG(0,("is_printer_published: GUID value stored as "
4879 + "invaluid type (%d)\n", regval_type(guid_val) ));
4880 + break;
4881 + }
4882 + }
4883
4884 free_a_printer(&printer, 2);
4885 - return True;
4886 + return ret;
4887 }
4888 #else
4889 WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action)
4890 @@ -3539,13 +3578,43 @@
4891 break;
4892 }
4893
4894 - /* add the new value */
4895 + DEBUG(8,("specific: [%s:%s], len: %d\n", keyname, valuename, size));
4896 +
4897 + /* Vista doesn't like unknown REG_BINARY values in DsSpooler.
4898 + Thanks to Martin Zielinski for the hint. */
4899 +
4900 + if ( type == REG_BINARY &&
4901 + strequal( keyname, SPOOL_DSSPOOLER_KEY ) &&
4902 + strequal( valuename, "objectGUID" ) )
4903 + {
4904 + struct uuid guid;
4905 + UNISTR2 unistr_guid;
4906 +
4907 + ZERO_STRUCT( unistr_guid );
4908 +
4909 + /* convert the GUID to a UNICODE string */
4910 +
4911 + memcpy( &guid, data_p, sizeof(struct uuid) );
4912 +
4913 + init_unistr2( &unistr_guid, smb_uuid_string_static(guid),
4914 + UNI_STR_TERMINATE );
4915 +
4916 + regval_ctr_addvalue( printer_data->keys[key_index].values,
4917 + valuename, REG_SZ,
4918 + (const char *)unistr_guid.buffer,
4919 + unistr_guid.uni_str_len*2 );
4920 +
4921 + } else {
4922 + /* add the value */
4923 +
4924 + regval_ctr_addvalue( printer_data->keys[key_index].values,
4925 + valuename, type, (const char *)data_p,
4926 + size );
4927 + }
4928
4929 - regval_ctr_addvalue( printer_data->keys[key_index].values, valuename, type, (const char *)data_p, size );
4930
4931 SAFE_FREE(data_p); /* 'B' option to tdbpack does a malloc() */
4932
4933 - DEBUG(8,("specific: [%s:%s], len: %d\n", keyname, valuename, size));
4934 }
4935
4936 return len;
4937 diff -urN samba-3.0.24.orig/source/printing/print_generic.c samba-3.0.24/source/printing/print_generic.c
4938 --- samba-3.0.24.orig/source/printing/print_generic.c 2007-02-04 19:59:13.000000000 +0100
4939 +++ samba-3.0.24/source/printing/print_generic.c 2007-08-07 09:38:18.000000000 +0200
4940 @@ -58,7 +58,7 @@
4941 if ( do_sub && snum != -1 )
4942 standard_sub_snum(snum,syscmd,sizeof(syscmd));
4943
4944 - ret = smbrun(syscmd,outfd);
4945 + ret = smbrun_no_sanitize(syscmd,outfd);
4946
4947 DEBUG(3,("Running the command `%s' gave %d\n",syscmd,ret));
4948
4949 diff -urN samba-3.0.24.orig/source/registry/regfio.c samba-3.0.24/source/registry/regfio.c
4950 --- samba-3.0.24.orig/source/registry/regfio.c 2007-02-04 19:59:26.000000000 +0100
4951 +++ samba-3.0.24/source/registry/regfio.c 2007-08-07 09:38:18.000000000 +0200
4952 @@ -642,8 +642,12 @@
4953 return False;
4954
4955 if ( UNMARSHALLING(&hbin->ps) ) {
4956 - if ( !(lf->hashes = PRS_ALLOC_MEM( &hbin->ps, REGF_HASH_REC, lf->num_keys )) )
4957 - return False;
4958 + if (lf->num_keys) {
4959 + if ( !(lf->hashes = PRS_ALLOC_MEM( &hbin->ps, REGF_HASH_REC, lf->num_keys )) )
4960 + return False;
4961 + } else {
4962 + lf->hashes = NULL;
4963 + }
4964 }
4965
4966 for ( i=0; i<lf->num_keys; i++ ) {
4967 diff -urN samba-3.0.24.orig/source/registry/reg_frontend.c samba-3.0.24/source/registry/reg_frontend.c
4968 --- samba-3.0.24.orig/source/registry/reg_frontend.c 2005-11-09 19:29:03.000000000 +0100
4969 +++ samba-3.0.24/source/registry/reg_frontend.c 2007-07-17 13:19:05.000000000 +0200
4970 @@ -35,9 +35,11 @@
4971
4972 REGISTRY_HOOK reg_hooks[] = {
4973 #ifndef REG_TDB_ONLY
4974 +#ifndef AVM_NO_PRINTING
4975 { KEY_PRINTING, &printing_ops },
4976 { KEY_PRINTING_2K, &printing_ops },
4977 { KEY_PRINTING_PORTS, &printing_ops },
4978 +#endif
4979 { KEY_SHARES, &shares_reg_ops },
4980 #endif
4981 { NULL, NULL }
4982 diff -urN samba-3.0.24.orig/source/rpc_client/cli_pipe.c samba-3.0.24/source/rpc_client/cli_pipe.c
4983 --- samba-3.0.24.orig/source/rpc_client/cli_pipe.c 2007-02-04 19:59:11.000000000 +0100
4984 +++ samba-3.0.24/source/rpc_client/cli_pipe.c 2007-07-17 13:19:05.000000000 +0200
4985 @@ -619,7 +619,11 @@
4986
4987 DEBUG(1, ("cli_pipe_validate_current_pdu: RPC fault code %s received from remote machine %s "
4988 "pipe %s fnum 0x%x!\n",
4989 +#if 1 /* AVM */
4990 + "ERRSTR-REPLACEMENT",
4991 +#else
4992 dcerpc_errstr(NT_STATUS_V(fault_resp.status)),
4993 +#endif
4994 cli->cli->desthost,
4995 cli->pipe_name,
4996 (unsigned int)cli->fnum));
4997 diff -urN samba-3.0.24.orig/source/rpc_parse/parse_dfs.c samba-3.0.24/source/rpc_parse/parse_dfs.c
4998 --- samba-3.0.24.orig/source/rpc_parse/parse_dfs.c 2007-02-04 19:59:22.000000000 +0100
4999 +++ samba-3.0.24/source/rpc_parse/parse_dfs.c 2007-08-07 09:38:18.000000000 +0200
5000 @@ -325,7 +325,9 @@
5001 return False;
5002
5003 if (UNMARSHALLING(ps)) {
5004 - v->stores = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->stores)*v->num_stores);
5005 + v->stores = PRS_ALLOC_MEM(ps,NETDFS_DFS_STORAGEINFO,v->num_stores);
5006 + if (!v->stores)
5007 + return False;
5008 }
5009 for (i_stores_1=0; i_stores_1<v->num_stores;i_stores_1++) {
5010 if (!netdfs_io_dfs_StorageInfo_p("stores", &v->stores[i_stores_1], ps, depth))
5011 @@ -447,7 +449,9 @@
5012 return False;
5013
5014 if (UNMARSHALLING(ps)) {
5015 - v->stores = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->stores)*v->num_stores);
5016 + v->stores = PRS_ALLOC_MEM(ps,NETDFS_DFS_STORAGEINFO,v->num_stores);
5017 + if (!v->stores)
5018 + return False;
5019 }
5020 for (i_stores_1=0; i_stores_1<v->num_stores;i_stores_1++) {
5021 if (!netdfs_io_dfs_StorageInfo_p("stores", &v->stores[i_stores_1], ps, depth))
5022 @@ -920,7 +924,9 @@
5023 return False;
5024
5025 if (UNMARSHALLING(ps)) {
5026 - v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
5027 + v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO1,v->count);
5028 + if (!v->s)
5029 + return False;
5030 }
5031 for (i_s_1=0; i_s_1<v->count;i_s_1++) {
5032 if (!netdfs_io_dfs_Info1_p("s", &v->s[i_s_1], ps, depth))
5033 @@ -986,7 +992,9 @@
5034 return False;
5035
5036 if (UNMARSHALLING(ps)) {
5037 - v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
5038 + v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO2,v->count);
5039 + if (!v->s)
5040 + return False;
5041 }
5042 for (i_s_1=0; i_s_1<v->count;i_s_1++) {
5043 if (!netdfs_io_dfs_Info2_p("s", &v->s[i_s_1], ps, depth))
5044 @@ -1052,7 +1060,9 @@
5045 return False;
5046
5047 if (UNMARSHALLING(ps)) {
5048 - v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
5049 + v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO3,v->count);
5050 + if (!v->s)
5051 + return False;
5052 }
5053 for (i_s_1=0; i_s_1<v->count;i_s_1++) {
5054 if (!netdfs_io_dfs_Info3_p("s", &v->s[i_s_1], ps, depth))
5055 @@ -1118,7 +1128,9 @@
5056 return False;
5057
5058 if (UNMARSHALLING(ps)) {
5059 - v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
5060 + v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO4,v->count);
5061 + if (!v->s)
5062 + return False;
5063 }
5064 for (i_s_1=0; i_s_1<v->count;i_s_1++) {
5065 if (!netdfs_io_dfs_Info4_p("s", &v->s[i_s_1], ps, depth))
5066 @@ -1184,7 +1196,9 @@
5067 return False;
5068
5069 if (UNMARSHALLING(ps)) {
5070 - v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
5071 + v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO200,v->count);
5072 + if (!v->s)
5073 + return False;
5074 }
5075 for (i_s_1=0; i_s_1<v->count;i_s_1++) {
5076 if (!netdfs_io_dfs_Info200_p("s", &v->s[i_s_1], ps, depth))
5077 @@ -1250,7 +1264,9 @@
5078 return False;
5079
5080 if (UNMARSHALLING(ps)) {
5081 - v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
5082 + v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO300,v->count);
5083 + if (!v->s)
5084 + return False;
5085 }
5086 for (i_s_1=0; i_s_1<v->count;i_s_1++) {
5087 if (!netdfs_io_dfs_Info300_p("s", &v->s[i_s_1], ps, depth))
5088 diff -urN samba-3.0.24.orig/source/rpc_parse/parse_lsa.c samba-3.0.24/source/rpc_parse/parse_lsa.c
5089 --- samba-3.0.24.orig/source/rpc_parse/parse_lsa.c 2007-02-04 19:59:22.000000000 +0100
5090 +++ samba-3.0.24/source/rpc_parse/parse_lsa.c 2007-08-07 09:38:18.000000000 +0200
5091 @@ -1171,7 +1171,7 @@
5092
5093 /* Mallocate memory if we're unpacking from the wire */
5094
5095 - if (UNMARSHALLING(ps)) {
5096 + if (UNMARSHALLING(ps) && sen->num_entries) {
5097 if ((sen->ptr_sid = PRS_ALLOC_MEM( ps, uint32, sen->num_entries)) == NULL) {
5098 DEBUG(3, ("init_lsa_sid_enum(): out of memory for "
5099 "ptr_sid\n"));
5100 @@ -1349,12 +1349,17 @@
5101 &trn->num_entries2))
5102 return False;
5103
5104 - if (UNMARSHALLING(ps)) {
5105 - if ((trn->name = PRS_ALLOC_MEM(ps, LSA_TRANS_NAME, trn->num_entries)) == NULL) {
5106 + if (trn->num_entries2 != trn->num_entries) {
5107 + /* RPC fault */
5108 + return False;
5109 + }
5110 +
5111 + if (UNMARSHALLING(ps) && trn->num_entries2) {
5112 + if ((trn->name = PRS_ALLOC_MEM(ps, LSA_TRANS_NAME, trn->num_entries2)) == NULL) {
5113 return False;
5114 }
5115
5116 - if ((trn->uni_name = PRS_ALLOC_MEM(ps, UNISTR2, trn->num_entries)) == NULL) {
5117 + if ((trn->uni_name = PRS_ALLOC_MEM(ps, UNISTR2, trn->num_entries2)) == NULL) {
5118 return False;
5119 }
5120 }
5121 @@ -1406,12 +1411,17 @@
5122 &trn->num_entries2))
5123 return False;
5124
5125 - if (UNMARSHALLING(ps)) {
5126 - if ((trn->name = PRS_ALLOC_MEM(ps, LSA_TRANS_NAME2, trn->num_entries)) == NULL) {
5127 + if (trn->num_entries2 != trn->num_entries) {
5128 + /* RPC fault */
5129 + return False;
5130 + }
5131 +
5132 + if (UNMARSHALLING(ps) && trn->num_entries2) {
5133 + if ((trn->name = PRS_ALLOC_MEM(ps, LSA_TRANS_NAME2, trn->num_entries2)) == NULL) {
5134 return False;
5135 }
5136
5137 - if ((trn->uni_name = PRS_ALLOC_MEM(ps, UNISTR2, trn->num_entries)) == NULL) {
5138 + if ((trn->uni_name = PRS_ALLOC_MEM(ps, UNISTR2, trn->num_entries2)) == NULL) {
5139 return False;
5140 }
5141 }
5142 @@ -1678,7 +1688,7 @@
5143 return False;
5144 }
5145
5146 - if (UNMARSHALLING(ps)) {
5147 + if (UNMARSHALLING(ps) && out->num_entries2) {
5148 if ((out->dom_rid = PRS_ALLOC_MEM(ps, DOM_RID, out->num_entries2))
5149 == NULL) {
5150 DEBUG(3, ("lsa_io_r_lookup_names(): out of memory\n"));
5151 @@ -1803,7 +1813,7 @@
5152 return False;
5153 }
5154
5155 - if (UNMARSHALLING(ps)) {
5156 + if (UNMARSHALLING(ps) && out->num_entries2) {
5157 if ((out->dom_rid = PRS_ALLOC_MEM(ps, DOM_RID2, out->num_entries2))
5158 == NULL) {
5159 DEBUG(3, ("lsa_io_r_lookup_names2(): out of memory\n"));
5160 @@ -1956,7 +1966,7 @@
5161 return False;
5162 }
5163
5164 - if (UNMARSHALLING(ps)) {
5165 + if (UNMARSHALLING(ps) && out->num_entries2) {
5166 if ((out->trans_sids = PRS_ALLOC_MEM(ps, LSA_TRANSLATED_SID3, out->num_entries2))
5167 == NULL) {
5168 DEBUG(3, ("lsa_io_r_lookup_names3(): out of memory\n"));
5169 @@ -2085,7 +2095,7 @@
5170 return False;
5171 }
5172
5173 - if (UNMARSHALLING(ps)) {
5174 + if (UNMARSHALLING(ps) && out->num_entries2) {
5175 if ((out->trans_sids = PRS_ALLOC_MEM(ps, LSA_TRANSLATED_SID3, out->num_entries2))
5176 == NULL) {
5177 DEBUG(3, ("lsa_io_r_lookup_names4(): out of memory\n"));
5178 @@ -2324,7 +2334,7 @@
5179 if(!prs_uint32("count1", ps, depth, &out->count1))
5180 return False;
5181
5182 - if (UNMARSHALLING(ps))
5183 + if (UNMARSHALLING(ps) && out->count1)
5184 if (!(out->privs = PRS_ALLOC_MEM(ps, LSA_PRIV_ENTRY, out->count1)))
5185 return False;
5186
5187 @@ -2759,7 +2769,7 @@
5188
5189 static BOOL lsa_io_privilege_set(const char *desc, PRIVILEGE_SET *out, prs_struct *ps, int depth)
5190 {
5191 - uint32 i;
5192 + uint32 i, dummy;
5193
5194 prs_debug(ps, depth, desc, "lsa_io_privilege_set");
5195 depth++;
5196 @@ -2767,7 +2777,7 @@
5197 if(!prs_align(ps))
5198 return False;
5199
5200 - if(!prs_uint32("count", ps, depth, &out->count))
5201 + if(!prs_uint32("count", ps, depth, &dummy))
5202 return False;
5203 if(!prs_uint32("control", ps, depth, &out->control))
5204 return False;
5205 @@ -3886,7 +3896,7 @@
5206 prs_debug(ps, depth, desc, "smb_io_lsa_data_buf");
5207 depth++;
5208
5209 - if ( UNMARSHALLING(ps) ) {
5210 + if ( UNMARSHALLING(ps) && length ) {
5211 if ( !(buf->data = PRS_ALLOC_MEM( ps, uint8, length )) )
5212 return False;
5213 }
5214 @@ -3900,7 +3910,7 @@
5215 if (!prs_uint32("length", ps, depth, &buf->length))
5216 return False;
5217
5218 - if(!prs_uint8s(False, "data", ps, depth, buf->data, size))
5219 + if(!prs_uint8s(False, "data", ps, depth, buf->data, length))
5220 return False;
5221
5222 return True;
5223 diff -urN samba-3.0.24.orig/source/rpc_parse/parse_net.c samba-3.0.24/source/rpc_parse/parse_net.c
5224 --- samba-3.0.24.orig/source/rpc_parse/parse_net.c 2007-02-04 19:59:22.000000000 +0100
5225 +++ samba-3.0.24/source/rpc_parse/parse_net.c 2007-08-07 09:38:18.000000000 +0200
5226 @@ -1721,9 +1721,13 @@
5227 }
5228
5229 if (UNMARSHALLING(ps)) {
5230 - usr->gids = PRS_ALLOC_MEM(ps, DOM_GID, usr->num_groups);
5231 - if (usr->gids == NULL)
5232 - return False;
5233 + if (usr->num_groups) {
5234 + usr->gids = PRS_ALLOC_MEM(ps, DOM_GID, usr->num_groups);
5235 + if (usr->gids == NULL)
5236 + return False;
5237 + } else {
5238 + usr->gids = NULL;
5239 + }
5240 }
5241
5242 for (i = 0; i < usr->num_groups; i++) {
5243 @@ -1756,10 +1760,15 @@
5244 return False;
5245
5246 if (UNMARSHALLING(ps)) {
5247 - usr->other_sids = PRS_ALLOC_MEM(ps, DOM_SID2, usr->num_other_sids);
5248 - usr->other_sids_attrib =
5249 - PRS_ALLOC_MEM(ps, uint32, usr->num_other_sids);
5250 -
5251 + if (usr->num_other_sids) {
5252 + usr->other_sids = PRS_ALLOC_MEM(ps, DOM_SID2, usr->num_other_sids);
5253 + usr->other_sids_attrib =
5254 + PRS_ALLOC_MEM(ps, uint32, usr->num_other_sids);
5255 + } else {
5256 + usr->other_sids = NULL;
5257 + usr->other_sids_attrib = NULL;
5258 + }
5259 +
5260 if ((num_other_sids != 0) &&
5261 ((usr->other_sids == NULL) ||
5262 (usr->other_sids_attrib == NULL)))
5263 diff -urN samba-3.0.24.orig/source/rpc_parse/parse_prs.c samba-3.0.24/source/rpc_parse/parse_prs.c
5264 --- samba-3.0.24.orig/source/rpc_parse/parse_prs.c 2007-02-04 19:59:22.000000000 +0100
5265 +++ samba-3.0.24/source/rpc_parse/parse_prs.c 2007-08-07 09:38:18.000000000 +0200
5266 @@ -156,7 +156,7 @@
5267 {
5268 char *ret = NULL;
5269
5270 - if (size) {
5271 + if (size && count) {
5272 /* We can't call the type-safe version here. */
5273 ret = _talloc_zero_array(ps->mem_ctx, size, count, "parse_prs");
5274 }
5275 @@ -642,9 +642,13 @@
5276 return True;
5277
5278 if (UNMARSHALLING(ps)) {
5279 - if ( !(*data = PRS_ALLOC_MEM_VOID(ps, data_size)) )
5280 - return False;
5281 - }
5282 + if (data_size) {
5283 + if ( !(*data = (void *)PRS_ALLOC_MEM(ps, char, data_size)) )
5284 + return False;
5285 + } else {
5286 + *data = NULL;
5287 + }
5288 + }
5289
5290 return prs_fn(name, ps, depth, *data);
5291 }
5292 @@ -789,8 +793,13 @@
5293 SIVAL(q,0,NT_STATUS_V(*status));
5294 }
5295
5296 - DEBUG(5,("%s%04x %s: %s\n", tab_depth(depth), ps->data_offset, name,
5297 - dcerpc_errstr(NT_STATUS_V(*status))));
5298 + DEBUG(5,("%s%04x %s: %s\n", tab_depth(depth), ps->data_offset, name,
5299 +#if 1 /* AVM */
5300 + "ERRSTR-REPLACEMENT"
5301 +#else
5302 + dcerpc_errstr(NT_STATUS_V(*status))
5303 +#endif
5304 + ));
5305
5306 ps->data_offset += sizeof(uint32);
5307
5308 @@ -1014,16 +1023,16 @@
5309 if (q == NULL)
5310 return False;
5311
5312 + /* If the string is empty, we don't have anything to stream */
5313 + if (str->buf_len==0)
5314 + return True;
5315 +
5316 if (UNMARSHALLING(ps)) {
5317 str->buffer = PRS_ALLOC_MEM(ps,uint16,str->buf_len);
5318 if (str->buffer == NULL)
5319 return False;
5320 }
5321
5322 - /* If the string is empty, we don't have anything to stream */
5323 - if (str->buf_len==0)
5324 - return True;
5325 -
5326 p = (char *)str->buffer;
5327
5328 dbg_rw_punival(charmode, name, depth, ps, q, p, str->buf_len);
5329 @@ -1053,6 +1062,8 @@
5330 buf->buffer = PRS_ALLOC_MEM(ps, uint16, buf->buf_max_len);
5331 if ( buf->buffer == NULL )
5332 return False;
5333 + } else {
5334 + buf->buffer = NULL;
5335 }
5336 }
5337
5338 @@ -1080,9 +1091,13 @@
5339 if (str->str_str_len > str->str_max_len) {
5340 return False;
5341 }
5342 - str->buffer = PRS_ALLOC_MEM(ps,unsigned char, str->str_max_len);
5343 - if (str->buffer == NULL)
5344 - return False;
5345 + if (str->str_max_len) {
5346 + str->buffer = PRS_ALLOC_MEM(ps,unsigned char, str->str_max_len);
5347 + if (str->buffer == NULL)
5348 + return False;
5349 + } else {
5350 + str->buffer = NULL;
5351 + }
5352 }
5353
5354 if (UNMARSHALLING(ps)) {
5355 @@ -1127,9 +1142,13 @@
5356 if (str->uni_str_len > str->uni_max_len) {
5357 return False;
5358 }
5359 - str->buffer = PRS_ALLOC_MEM(ps,uint16,str->uni_max_len);
5360 - if (str->buffer == NULL)
5361 - return False;
5362 + if (str->uni_max_len) {
5363 + str->buffer = PRS_ALLOC_MEM(ps,uint16,str->uni_max_len);
5364 + if (str->buffer == NULL)
5365 + return False;
5366 + } else {
5367 + str->buffer = NULL;
5368 + }
5369 }
5370
5371 p = (char *)str->buffer;
5372 @@ -1154,9 +1173,13 @@
5373 return False;
5374
5375 if (UNMARSHALLING(ps)) {
5376 - str->str.buffer = PRS_ALLOC_MEM(ps,uint16,str->uni_str_len);
5377 - if (str->str.buffer == NULL)
5378 - return False;
5379 + if (str->uni_str_len) {
5380 + str->str.buffer = PRS_ALLOC_MEM(ps,uint16,str->uni_str_len);
5381 + if (str->str.buffer == NULL)
5382 + return False;
5383 + } else {
5384 + str->str.buffer = NULL;
5385 + }
5386 }
5387
5388 p = (char *)str->str.buffer;
5389 diff -urN samba-3.0.24.orig/source/rpc_parse/parse_samr.c samba-3.0.24/source/rpc_parse/parse_samr.c
5390 --- samba-3.0.24.orig/source/rpc_parse/parse_samr.c 2007-02-04 19:59:22.000000000 +0100
5391 +++ samba-3.0.24/source/rpc_parse/parse_samr.c 2007-08-07 09:38:18.000000000 +0200
5392 @@ -3337,7 +3337,7 @@
5393 if(!prs_uint32("num_entries3", ps, depth, &r_u->num_entries3))
5394 return False;
5395
5396 - if (UNMARSHALLING(ps)) {
5397 + if (UNMARSHALLING(ps) && r_u->num_entries2) {
5398 r_u->sam = PRS_ALLOC_MEM(ps,SAM_ENTRY,r_u->num_entries2);
5399 r_u->uni_dom_name = PRS_ALLOC_MEM(ps,UNISTR2,r_u->num_entries2);
5400 }
5401 @@ -3476,7 +3476,7 @@
5402 if(!prs_uint32("num_entries3", ps, depth, &r_u->num_entries3))
5403 return False;
5404
5405 - if (UNMARSHALLING(ps)) {
5406 + if (UNMARSHALLING(ps) && r_u->num_entries2) {
5407 r_u->sam = PRS_ALLOC_MEM(ps,SAM_ENTRY,r_u->num_entries2);
5408 r_u->uni_grp_name = PRS_ALLOC_MEM(ps,UNISTR2,r_u->num_entries2);
5409 }
5410 @@ -4980,12 +4980,13 @@
5411 return False;
5412 }
5413
5414 - if (UNMARSHALLING(ps))
5415 + if (UNMARSHALLING(ps) && r_u->num_rids2) {
5416 r_u->rids = PRS_ALLOC_MEM(ps, uint32, r_u->num_rids2);
5417
5418 - if (!r_u->rids) {
5419 - DEBUG(0, ("NULL rids in samr_io_r_lookup_names\n"));
5420 - return False;
5421 + if (!r_u->rids) {
5422 + DEBUG(0, ("NULL rids in samr_io_r_lookup_names\n"));
5423 + return False;
5424 + }
5425 }
5426
5427 for (i = 0; i < r_u->num_rids2; i++) {
5428 @@ -5009,12 +5010,13 @@
5429 return False;
5430 }
5431
5432 - if (UNMARSHALLING(ps))
5433 + if (UNMARSHALLING(ps) && r_u->num_types2) {
5434 r_u->types = PRS_ALLOC_MEM(ps, uint32, r_u->num_types2);
5435
5436 - if (!r_u->types) {
5437 - DEBUG(0, ("NULL types in samr_io_r_lookup_names\n"));
5438 - return False;
5439 + if (!r_u->types) {
5440 + DEBUG(0, ("NULL types in samr_io_r_lookup_names\n"));
5441 + return False;
5442 + }
5443 }
5444
5445 for (i = 0; i < r_u->num_types2; i++) {
5446 diff -urN samba-3.0.24.orig/source/rpc_parse/parse_sec.c samba-3.0.24/source/rpc_parse/parse_sec.c
5447 --- samba-3.0.24.orig/source/rpc_parse/parse_sec.c 2005-04-18 18:38:20.000000000 +0200
5448 +++ samba-3.0.24/source/rpc_parse/parse_sec.c 2007-08-07 09:38:18.000000000 +0200
5449 @@ -122,7 +122,7 @@
5450 for you as it reads them.
5451 ********************************************************************/
5452
5453 -BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth)
5454 +static BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth)
5455 {
5456 unsigned int i;
5457 uint32 old_offset;
5458 @@ -165,13 +165,10 @@
5459 return False;
5460
5461 if (UNMARSHALLING(ps)) {
5462 - /*
5463 - * Even if the num_aces is zero, allocate memory as there's a difference
5464 - * between a non-present DACL (allow all access) and a DACL with no ACE's
5465 - * (allow no access).
5466 - */
5467 - if((psa->ace = PRS_ALLOC_MEM(ps, SEC_ACE, psa->num_aces+1)) == NULL)
5468 - return False;
5469 + if (psa->num_aces) {
5470 + if((psa->ace = PRS_ALLOC_MEM(ps, SEC_ACE, psa->num_aces)) == NULL)
5471 + return False;
5472 + }
5473 }
5474
5475 for (i = 0; i < psa->num_aces; i++) {
5476 diff -urN samba-3.0.24.orig/source/rpc_parse/parse_spoolss.c samba-3.0.24/source/rpc_parse/parse_spoolss.c
5477 --- samba-3.0.24.orig/source/rpc_parse/parse_spoolss.c 2007-02-04 19:59:22.000000000 +0100
5478 +++ samba-3.0.24/source/rpc_parse/parse_spoolss.c 2007-08-07 09:38:18.000000000 +0200
5479 @@ -227,8 +227,13 @@
5480 if(!prs_uint32("count2", ps, depth, &type->count2))
5481 return False;
5482
5483 - if (type->count2 != type->count)
5484 + if (type->count2 != type->count) {
5485 DEBUG(4,("What a mess, count was %x now is %x !\n", type->count, type->count2));
5486 + return False;
5487 + }
5488 + if (type->count2 > MAX_NOTIFY_TYPE_FOR_NOW) {
5489 + return False;
5490 + }
5491
5492 /* parse the option type data */
5493 for(i=0;i<type->count2;i++)
5494 @@ -252,7 +257,7 @@
5495 return False;
5496
5497 /* reading */
5498 - if (UNMARSHALLING(ps))
5499 + if (UNMARSHALLING(ps) && ctr->count)
5500 if((ctr->type=PRS_ALLOC_MEM(ps,SPOOL_NOTIFY_OPTION_TYPE,ctr->count)) == NULL)
5501 return False;
5502
5503 @@ -411,7 +416,7 @@
5504 if(!prs_uint32("string length", ps, depth, &data->notify_data.data.length))
5505 return False;
5506
5507 - if (UNMARSHALLING(ps)) {
5508 + if (UNMARSHALLING(ps) && data->notify_data.data.length) {
5509 data->notify_data.data.string = PRS_ALLOC_MEM(ps, uint16,
5510 data->notify_data.data.length);
5511
5512 @@ -430,7 +435,7 @@
5513
5514 case NOTIFY_POINTER:
5515
5516 - if (UNMARSHALLING(ps)) {
5517 + if (UNMARSHALLING(ps) && data->notify_data.data.length) {
5518 data->notify_data.data.string = PRS_ALLOC_MEM(ps, uint16,
5519 data->notify_data.data.length);
5520
5521 @@ -490,9 +495,13 @@
5522
5523 /* Tallocate memory for string */
5524
5525 - data->notify_data.data.string = PRS_ALLOC_MEM(ps, uint16, x * 2);
5526 - if (!data->notify_data.data.string)
5527 - return False;
5528 + if (x) {
5529 + data->notify_data.data.string = PRS_ALLOC_MEM(ps, uint16, x * 2);
5530 + if (!data->notify_data.data.string)
5531 + return False;
5532 + } else {
5533 + data->notify_data.data.string = NULL;
5534 + }
5535
5536 if(!prs_uint16uni(True,"string",ps,depth,data->notify_data.data.string,x))
5537 return False;
5538 @@ -3893,7 +3902,16 @@
5539 }
5540 case 3:
5541 {
5542 - ptr_sec_desc = q_u->info.info_3->secdesc_ptr;
5543 + /* FIXME ! Our parsing here is wrong I think,
5544 + * but for a level3 it makes no sense for
5545 + * ptr_sec_desc to be NULL. JRA. Based on
5546 + * a Vista sniff from Martin Zielinski <mz@seh.de>.
5547 + */
5548 + if (UNMARSHALLING(ps)) {
5549 + ptr_sec_desc = 1;
5550 + } else {
5551 + ptr_sec_desc = q_u->info.info_3->secdesc_ptr;
5552 + }
5553 break;
5554 }
5555 }
5556 @@ -5931,14 +5949,14 @@
5557 case REG_BINARY:
5558 case REG_DWORD:
5559 case REG_MULTI_SZ:
5560 - if (q_u->max_len) {
5561 - if (UNMARSHALLING(ps))
5562 - q_u->data=PRS_ALLOC_MEM(ps, uint8, q_u->max_len);
5563 - if(q_u->data == NULL)
5564 - return False;
5565 - if(!prs_uint8s(False,"data", ps, depth, q_u->data, q_u->max_len))
5566 - return False;
5567 - }
5568 + if (q_u->max_len) {
5569 + if (UNMARSHALLING(ps))
5570 + q_u->data=PRS_ALLOC_MEM(ps, uint8, q_u->max_len);
5571 + if(q_u->data == NULL)
5572 + return False;
5573 + if(!prs_uint8s(False,"data", ps, depth, q_u->data, q_u->max_len))
5574 + return False;
5575 + }
5576 if(!prs_align(ps))
5577 return False;
5578 break;
5579 @@ -6956,7 +6974,7 @@
5580
5581 /* first loop to write basic enum_value information */
5582
5583 - if (UNMARSHALLING(ps)) {
5584 + if (UNMARSHALLING(ps) && ctr->size_of_array) {
5585 ctr->values = PRS_ALLOC_MEM(ps, PRINTER_ENUM_VALUES, ctr->size_of_array);
5586 if (!ctr->values)
5587 return False;
5588 diff -urN samba-3.0.24.orig/source/rpc_parse/parse_srv.c samba-3.0.24/source/rpc_parse/parse_srv.c
5589 --- samba-3.0.24.orig/source/rpc_parse/parse_srv.c 2005-04-18 18:38:20.000000000 +0200
5590 +++ samba-3.0.24/source/rpc_parse/parse_srv.c 2007-08-07 09:38:18.000000000 +0200
5591 @@ -782,7 +782,7 @@
5592 int num_entries = ctr->num_entries;
5593 int i;
5594
5595 - if (UNMARSHALLING(ps)) {
5596 + if (UNMARSHALLING(ps) && num_entries) {
5597 if (!(info0 = PRS_ALLOC_MEM(ps, SRV_SHARE_INFO_0, num_entries)))
5598 return False;
5599 ctr->share.info0 = info0;
5600 @@ -808,7 +808,7 @@
5601 int num_entries = ctr->num_entries;
5602 int i;
5603
5604 - if (UNMARSHALLING(ps)) {
5605 + if (UNMARSHALLING(ps) && num_entries) {
5606 if (!(info1 = PRS_ALLOC_MEM(ps, SRV_SHARE_INFO_1, num_entries)))
5607 return False;
5608 ctr->share.info1 = info1;
5609 @@ -834,7 +834,7 @@
5610 int num_entries = ctr->num_entries;
5611 int i;
5612
5613 - if (UNMARSHALLING(ps)) {
5614 + if (UNMARSHALLING(ps) && num_entries) {
5615 if (!(info2 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_2,num_entries)))
5616 return False;
5617 ctr->share.info2 = info2;
5618 @@ -859,7 +859,7 @@
5619 int num_entries = ctr->num_entries;
5620 int i;
5621
5622 - if (UNMARSHALLING(ps)) {
5623 + if (UNMARSHALLING(ps) && num_entries) {
5624 if (!(info501 = PRS_ALLOC_MEM(ps, SRV_SHARE_INFO_501, num_entries)))
5625 return False;
5626 ctr->share.info501 = info501;
5627 @@ -884,7 +884,7 @@
5628 int num_entries = ctr->num_entries;
5629 int i;
5630
5631 - if (UNMARSHALLING(ps)) {
5632 + if (UNMARSHALLING(ps) && num_entries) {
5633 if (!(info502 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_502,num_entries)))
5634 return False;
5635 ctr->share.info502 = info502;
5636 @@ -910,7 +910,7 @@
5637 int num_entries = ctr->num_entries;
5638 int i;
5639
5640 - if (UNMARSHALLING(ps)) {
5641 + if (UNMARSHALLING(ps) && num_entries) {
5642 if (!(info1004 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_1004,num_entries)))
5643 return False;
5644 ctr->share.info1004 = info1004;
5645 @@ -936,7 +936,7 @@
5646 int num_entries = ctr->num_entries;
5647 int i;
5648
5649 - if (UNMARSHALLING(ps)) {
5650 + if (UNMARSHALLING(ps) && num_entries) {
5651 if (!(info1005 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_1005,num_entries)))
5652 return False;
5653 ctr->share.info1005 = info1005;
5654 @@ -956,7 +956,7 @@
5655 int num_entries = ctr->num_entries;
5656 int i;
5657
5658 - if (UNMARSHALLING(ps)) {
5659 + if (UNMARSHALLING(ps) && num_entries) {
5660 if (!(info1006 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_1006,num_entries)))
5661 return False;
5662 ctr->share.info1006 = info1006;
5663 @@ -976,7 +976,7 @@
5664 int num_entries = ctr->num_entries;
5665 int i;
5666
5667 - if (UNMARSHALLING(ps)) {
5668 + if (UNMARSHALLING(ps) && num_entries) {
5669 if (!(info1007 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_1007,num_entries)))
5670 return False;
5671 ctr->share.info1007 = info1007;
5672 @@ -1002,7 +1002,7 @@
5673 int num_entries = ctr->num_entries;
5674 int i;
5675
5676 - if (UNMARSHALLING(ps)) {
5677 + if (UNMARSHALLING(ps) && num_entries) {
5678 if (!(info1501 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_1501,num_entries)))
5679 return False;
5680 ctr->share.info1501 = info1501;
5681 @@ -2558,7 +2558,7 @@
5682 int num_entries = ctr->num_entries;
5683 int i;
5684
5685 - if (UNMARSHALLING(ps)) {
5686 + if (UNMARSHALLING(ps) && num_entries) {
5687 if (!(info3 = PRS_ALLOC_MEM(ps, SRV_FILE_INFO_3, num_entries)))
5688 return False;
5689 ctr->file.info3 = info3;
5690 @@ -3377,7 +3377,7 @@
5691
5692 r_n->disk_enum_ctr.entries_read = entries_read3;
5693
5694 - if(UNMARSHALLING(ps)) {
5695 + if(UNMARSHALLING(ps) && entries_read3) {
5696
5697 DISK_INFO *dinfo;
5698
5699 @@ -3386,7 +3386,7 @@
5700 r_n->disk_enum_ctr.disk_info = dinfo;
5701 }
5702
5703 - for(i=0; i < r_n->disk_enum_ctr.entries_read; i++) {
5704 + for(i=0; i < entries_read3; i++) {
5705
5706 if(!prs_uint32("unknown", ps, depth, &r_n->disk_enum_ctr.disk_info[i].unknown))
5707 return False;
5708 diff -urN samba-3.0.24.orig/source/rpc_server/srv_pipe.c samba-3.0.24/source/rpc_server/srv_pipe.c
5709 --- samba-3.0.24.orig/source/rpc_server/srv_pipe.c 2007-02-04 19:59:21.000000000 +0100
5710 +++ samba-3.0.24/source/rpc_server/srv_pipe.c 2007-07-17 13:19:05.000000000 +0200
5711 @@ -2331,6 +2331,7 @@
5712 int n_cmds = 0;
5713
5714 switch ( idx ) {
5715 +#ifndef AVM_SMALLER
5716 case PI_LSARPC:
5717 lsa_get_pipe_fns( &cmds, &n_cmds );
5718 break;
5719 @@ -2343,12 +2344,14 @@
5720 case PI_NETLOGON:
5721 netlog_get_pipe_fns( &cmds, &n_cmds );
5722 break;
5723 +#endif /* AVM_SMALLER */
5724 case PI_SRVSVC:
5725 srvsvc_get_pipe_fns( &cmds, &n_cmds );
5726 break;
5727 case PI_WKSSVC:
5728 wkssvc_get_pipe_fns( &cmds, &n_cmds );
5729 break;
5730 +#ifndef AVM_SMALLER
5731 case PI_WINREG:
5732 reg_get_pipe_fns( &cmds, &n_cmds );
5733 break;
5734 @@ -2367,6 +2370,8 @@
5735 case PI_NTSVCS:
5736 ntsvcs_get_pipe_fns( &cmds, &n_cmds );
5737 break;
5738 +#endif /* AVM_SMALLER */
5739 +
5740 #ifdef DEVELOPER
5741 case PI_ECHO:
5742 echo_get_pipe_fns( &cmds, &n_cmds );
5743 diff -urN samba-3.0.24.orig/source/rpc_server/srv_spoolss.c samba-3.0.24/source/rpc_server/srv_spoolss.c
5744 --- samba-3.0.24.orig/source/rpc_server/srv_spoolss.c 2006-04-20 04:29:27.000000000 +0200
5745 +++ samba-3.0.24/source/rpc_server/srv_spoolss.c 2007-08-07 09:38:18.000000000 +0200
5746 @@ -1477,6 +1477,15 @@
5747 ZERO_STRUCT(r_u);
5748
5749 if(!spoolss_io_q_addprinterdriverex("", &q_u, data, 0)) {
5750 + if (q_u.level != 3 && q_u.level != 6) {
5751 + /* Clever hack from Martin Zielinski <mz@seh.de>
5752 + * to allow downgrade from level 8 (Vista).
5753 + */
5754 + DEBUG(3,("api_spoolss_addprinterdriverex: unknown SPOOL_Q_ADDPRINTERDRIVEREX level %u.\n",
5755 + (unsigned int)q_u.level ));
5756 + setup_fault_pdu(p, NT_STATUS(DCERPC_FAULT_INVALID_TAG));
5757 + return True;
5758 + }
5759 DEBUG(0,("spoolss_io_q_addprinterdriverex: unable to unmarshall SPOOL_Q_ADDPRINTERDRIVEREX.\n"));
5760 return False;
5761 }
5762 diff -urN samba-3.0.24.orig/source/rpc_server/srv_spoolss_nt.c samba-3.0.24/source/rpc_server/srv_spoolss_nt.c
5763 --- samba-3.0.24.orig/source/rpc_server/srv_spoolss_nt.c 2007-02-04 19:59:21.000000000 +0100
5764 +++ samba-3.0.24/source/rpc_server/srv_spoolss_nt.c 2007-08-07 09:38:18.000000000 +0200
5765 @@ -5848,6 +5848,12 @@
5766 goto done;
5767 }
5768
5769 + if (!secdesc_ctr) {
5770 + DEBUG(10,("update_printer_sec: secdesc_ctr is NULL !\n"));
5771 + result = WERR_INVALID_PARAM;
5772 + goto done;
5773 + }
5774 +
5775 /* Check the user has permissions to change the security
5776 descriptor. By experimentation with two NT machines, the user
5777 requires Full Access to the printer to change security
5778 @@ -9378,6 +9384,15 @@
5779
5780 /* housekeeping information in the reply */
5781
5782 + /* Fix from Martin Zielinski <mz@seh.de> - ensure
5783 + * the hand marshalled container size is a multiple
5784 + * of 4 bytes for RPC alignment.
5785 + */
5786 +
5787 + if (needed % 4) {
5788 + needed += 4-(needed % 4);
5789 + }
5790 +
5791 r_u->needed = needed;
5792 r_u->returned = num_entries;
5793
5794 diff -urN samba-3.0.24.orig/source/smbd/change_trust_pw.c samba-3.0.24/source/smbd/change_trust_pw.c
5795 --- samba-3.0.24.orig/source/smbd/change_trust_pw.c 2005-10-18 04:44:56.000000000 +0200
5796 +++ samba-3.0.24/source/smbd/change_trust_pw.c 2007-07-17 13:19:05.000000000 +0200
5797 @@ -30,6 +30,10 @@
5798
5799 NTSTATUS change_trust_account_password( const char *domain, const char *remote_machine)
5800 {
5801 +#ifdef AVM_SMALLER
5802 + return NT_STATUS_UNSUCCESSFUL;
5803 +#else
5804 +
5805 NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
5806 struct in_addr pdc_ip;
5807 fstring dc_name;
5808 @@ -95,4 +99,5 @@
5809 DEBUG(5,("change_trust_account_password: sucess!\n"));
5810
5811 return nt_status;
5812 +#endif /* AVM_SMALLER */
5813 }
5814 diff -urN samba-3.0.24.orig/source/smbd/close.c samba-3.0.24/source/smbd/close.c
5815 --- samba-3.0.24.orig/source/smbd/close.c 2007-02-04 19:59:13.000000000 +0100
5816 +++ samba-3.0.24/source/smbd/close.c 2007-07-17 13:19:05.000000000 +0200
5817 @@ -295,7 +295,9 @@
5818 }
5819
5820 if (fsp->print_file) {
5821 +#ifndef AVM_NO_PRINTING
5822 print_fsp_end(fsp, close_type);
5823 +#endif
5824 file_free(fsp);
5825 return 0;
5826 }
5827 diff -urN samba-3.0.24.orig/source/smbd/conn.c samba-3.0.24/source/smbd/conn.c
5828 --- samba-3.0.24.orig/source/smbd/conn.c 2007-02-04 19:59:13.000000000 +0100
5829 +++ samba-3.0.24/source/smbd/conn.c 2007-07-17 13:19:05.000000000 +0200
5830 @@ -205,10 +205,13 @@
5831 * idle with a handle open.
5832 */
5833
5834 +
5835 +#ifndef AVM_SMALLER
5836 for (plist = get_first_internal_pipe(); plist; plist = get_next_internal_pipe(plist))
5837 if (plist->pipe_handles && plist->pipe_handles->count)
5838 allidle = False;
5839 -
5840 +#endif
5841 +
5842 return allidle;
5843 }
5844
5845 diff -urN samba-3.0.24.orig/source/smbd/dfree.c samba-3.0.24/source/smbd/dfree.c
5846 --- samba-3.0.24.orig/source/smbd/dfree.c 2005-11-09 19:28:55.000000000 +0100
5847 +++ samba-3.0.24/source/smbd/dfree.c 2007-07-17 13:19:05.000000000 +0200
5848 @@ -130,11 +130,13 @@
5849 }
5850 }
5851
5852 +#if 0 /* AR7 */
5853 if (disk_quotas(path, &bsize_q, &dfree_q, &dsize_q)) {
5854 (*bsize) = bsize_q;
5855 (*dfree) = MIN(*dfree,dfree_q);
5856 (*dsize) = MIN(*dsize,dsize_q);
5857 }
5858 +#endif
5859
5860 /* FIXME : Any reason for this assumption ? */
5861 if (*bsize < 256) {
5862 diff -urN samba-3.0.24.orig/source/smbd/dir.c samba-3.0.24/source/smbd/dir.c
5863 --- samba-3.0.24.orig/source/smbd/dir.c 2007-02-04 19:59:13.000000000 +0100
5864 +++ samba-3.0.24/source/smbd/dir.c 2007-08-07 09:38:18.000000000 +0200
5865 @@ -1255,3 +1255,42 @@
5866 }
5867 return False;
5868 }
5869 +
5870 +/*****************************************************************
5871 + Is this directory empty ?
5872 +*****************************************************************/
5873 +
5874 +NTSTATUS can_delete_directory(struct connection_struct *conn,
5875 + const char *dirname)
5876 +{
5877 + NTSTATUS status = NT_STATUS_OK;
5878 + long dirpos = 0;
5879 + const char *dname;
5880 + struct smb_Dir *dir_hnd = OpenDir(conn, dirname, NULL, 0);
5881 +
5882 + if (!dir_hnd) {
5883 + return map_nt_error_from_unix(errno);
5884 + }
5885 +
5886 + while ((dname = ReadDirName(dir_hnd,&dirpos))) {
5887 + SMB_STRUCT_STAT st;
5888 +
5889 + /* Quick check for "." and ".." */
5890 + if (dname[0] == '.') {
5891 + if (!dname[1] || (dname[1] == '.' && !dname[2])) {
5892 + continue;
5893 + }
5894 + }
5895 +
5896 + if (!is_visible_file(conn, dirname, dname, &st, True)) {
5897 + continue;
5898 + }
5899 +
5900 + DEBUG(10,("can_delete_directory: got name %s - can't delete\n", dname ));
5901 + status = NT_STATUS_DIRECTORY_NOT_EMPTY;
5902 + break;
5903 + }
5904 + CloseDir(dir_hnd);
5905 +
5906 + return status;
5907 +}
5908 diff -urN samba-3.0.24.orig/source/smbd/dosmode.c samba-3.0.24/source/smbd/dosmode.c
5909 --- samba-3.0.24.orig/source/smbd/dosmode.c 2007-02-04 19:59:13.000000000 +0100
5910 +++ samba-3.0.24/source/smbd/dosmode.c 2007-07-17 13:19:05.000000000 +0200
5911 @@ -48,12 +48,15 @@
5912 if (ISDOT(path) || ISDOTDOT(path)) {
5913 return 0;
5914 }
5915 -
5916 +#ifdef AVM_SMALLER
5917 + return 0;
5918 +#else
5919 if (!lp_dmapi_support(SNUM(conn)) || !dmapi_have_session()) {
5920 return 0;
5921 }
5922
5923 return dmapi_file_flags(path);
5924 +#endif
5925 }
5926
5927 /****************************************************************************
5928 diff -urN samba-3.0.24.orig/source/smbd/fileio.c samba-3.0.24/source/smbd/fileio.c
5929 --- samba-3.0.24.orig/source/smbd/fileio.c 2005-10-18 04:44:57.000000000 +0200
5930 +++ samba-3.0.24/source/smbd/fileio.c 2007-08-07 09:38:18.000000000 +0200
5931 @@ -176,6 +176,8 @@
5932
5933 static int wcp_file_size_change(files_struct *fsp)
5934 {
5935 +/* AVM: Fuer Pruefung des freien Speichers auf dem Datentraeger wird
5936 + SMB_VFS_FTRUNCATE aufgerufen, auch falls es langsam sein sollte */
5937 int ret;
5938 write_cache *wcp = fsp->wcp;
5939
5940 @@ -199,6 +201,10 @@
5941 int write_path = -1;
5942
5943 if (fsp->print_file) {
5944 +#ifdef AVM_NO_PRINTING
5945 + errno = EBADF;
5946 + return -1;
5947 +#else
5948 fstring sharename;
5949 uint32 jobid;
5950
5951 @@ -210,6 +216,7 @@
5952 }
5953
5954 return print_job_write(SNUM(fsp->conn), jobid, data, pos, n);
5955 +#endif /* AVM_NO_PRINTING */
5956 }
5957
5958 if (!fsp->can_write) {
5959 diff -urN samba-3.0.24.orig/source/smbd/files.c samba-3.0.24/source/smbd/files.c
5960 --- samba-3.0.24.orig/source/smbd/files.c 2007-02-04 19:59:13.000000000 +0100
5961 +++ samba-3.0.24/source/smbd/files.c 2007-07-17 13:19:05.000000000 +0200
5962 @@ -203,10 +203,12 @@
5963 exit_server("out of memory in file_init");
5964 }
5965
5966 +#ifndef AVM_SMALLER
5967 /*
5968 * Ensure that pipe_handle_oppset is set correctly.
5969 */
5970 set_pipe_handle_offset(real_max_open_files);
5971 +#endif
5972 }
5973
5974 /****************************************************************************
5975 diff -urN samba-3.0.24.orig/source/smbd/lanman.c samba-3.0.24/source/smbd/lanman.c
5976 --- samba-3.0.24.orig/source/smbd/lanman.c 2007-02-04 19:59:13.000000000 +0100
5977 +++ samba-3.0.24/source/smbd/lanman.c 2007-07-17 13:19:05.000000000 +0200
5978 @@ -378,6 +378,7 @@
5979 PACK(desc,t,v);
5980 }
5981
5982 +#ifndef AVM_NO_PRINTING
5983 /****************************************************************************
5984 Get a print queue.
5985 ****************************************************************************/
5986 @@ -753,6 +754,7 @@
5987
5988 return result;
5989 }
5990 +#endif /* AVM_NO_PRINTING */
5991
5992 static BOOL api_DosPrintQGetInfo(connection_struct *conn,
5993 uint16 vuid, char *param,char *data,
5994 @@ -760,6 +762,9 @@
5995 char **rdata,char **rparam,
5996 int *rdata_len,int *rparam_len)
5997 {
5998 +#ifdef AVM_NO_PRINTING
5999 +return False;
6000 +#else
6001 char *str1 = param+2;
6002 char *str2 = skip_string(str1,1);
6003 char *p = skip_string(str2,1);
6004 @@ -865,6 +870,7 @@
6005 SAFE_FREE(tmpdata);
6006
6007 return(True);
6008 +#endif /* AVM_NO_PRINTING */
6009 }
6010
6011 /****************************************************************************
6012 @@ -876,6 +882,9 @@
6013 char **rdata, char** rparam,
6014 int *rdata_len, int *rparam_len)
6015 {
6016 +#ifdef AVM_NO_PRINTING
6017 +return False;
6018 +#else
6019 char *param_format = param+2;
6020 char *output_format1 = skip_string(param_format,1);
6021 char *p = skip_string(output_format1,1);
6022 @@ -1004,6 +1013,7 @@
6023 SAFE_FREE(status);
6024
6025 return False;
6026 +#endif /* AVM_NO_PRINTING */
6027 }
6028
6029 /****************************************************************************
6030 @@ -2378,6 +2388,9 @@
6031 char **rdata,char **rparam,
6032 int *rdata_len,int *rparam_len)
6033 {
6034 +#ifdef AVM_NO_PRINTING
6035 +return False;
6036 +#else
6037 int function = SVAL(param,0);
6038 char *str1 = param+2;
6039 char *str2 = skip_string(str1,1);
6040 @@ -2438,6 +2451,7 @@
6041 SSVAL(*rparam,2,0); /* converter word */
6042
6043 return(True);
6044 +#endif
6045 }
6046
6047 /****************************************************************************
6048 @@ -2449,6 +2463,9 @@
6049 char **rdata,char **rparam,
6050 int *rdata_len,int *rparam_len)
6051 {
6052 +#ifdef AVM_NO_PRINTING
6053 +return False;
6054 +#else
6055 int function = SVAL(param,0);
6056 char *str1 = param+2;
6057 char *str2 = skip_string(str1,1);
6058 @@ -2494,6 +2511,7 @@
6059 SSVAL(*rparam,2,0); /* converter word */
6060
6061 return(True);
6062 +#endif
6063 }
6064
6065 /****************************************************************************
6066 @@ -2525,6 +2543,9 @@
6067 char **rdata,char **rparam,
6068 int *rdata_len,int *rparam_len)
6069 {
6070 +#ifdef AVM_NO_PRINTING
6071 +return False;
6072 +#else
6073 struct pack_desc desc;
6074 char *str1 = param+2;
6075 char *str2 = skip_string(str1,1);
6076 @@ -2590,6 +2611,7 @@
6077 SSVAL(*rparam,2,0); /* converter word */
6078
6079 return(True);
6080 +#endif
6081 }
6082
6083
6084 @@ -3272,6 +3294,9 @@
6085 char **rdata,char **rparam,
6086 int *rdata_len,int *rparam_len)
6087 {
6088 +#ifdef AVM_NO_PRINTING
6089 +return False;
6090 +#else
6091 char *str1 = param+2;
6092 char *str2 = skip_string(str1,1);
6093 char *p = skip_string(str2,1);
6094 @@ -3358,6 +3383,7 @@
6095 DEBUG(4,("WPrintJobGetInfo: errorcode %d\n",desc.errcode));
6096
6097 return True;
6098 +#endif
6099 }
6100
6101 static BOOL api_WPrintJobEnumerate(connection_struct *conn,uint16 vuid, char *param,char *data,
6102 @@ -3365,6 +3391,9 @@
6103 char **rdata,char **rparam,
6104 int *rdata_len,int *rparam_len)
6105 {
6106 +#ifdef AVM_NO_PRINTING
6107 +return False;
6108 +#else
6109 char *str1 = param+2;
6110 char *str2 = skip_string(str1,1);
6111 char *p = skip_string(str2,1);
6112 @@ -3440,6 +3469,7 @@
6113 DEBUG(4,("WPrintJobEnumerate: errorcode %d\n",desc.errcode));
6114
6115 return True;
6116 +#endif
6117 }
6118
6119 static int check_printdest_info(struct pack_desc* desc,
6120 @@ -3509,6 +3539,9 @@
6121 char **rdata,char **rparam,
6122 int *rdata_len,int *rparam_len)
6123 {
6124 +#ifdef AVM_NO_PRINTING
6125 +return False;
6126 +#else
6127 char *str1 = param+2;
6128 char *str2 = skip_string(str1,1);
6129 char *p = skip_string(str2,1);
6130 @@ -3573,6 +3606,7 @@
6131 SAFE_FREE(tmpdata);
6132
6133 return True;
6134 +#endif
6135 }
6136
6137 static BOOL api_WPrintDestEnum(connection_struct *conn,uint16 vuid, char *param,char *data,
6138 @@ -3580,6 +3614,9 @@
6139 char **rdata,char **rparam,
6140 int *rdata_len,int *rparam_len)
6141 {
6142 +#ifdef AVM_NO_PRINTING
6143 +return False;
6144 +#else
6145 char *str1 = param+2;
6146 char *str2 = skip_string(str1,1);
6147 char *p = skip_string(str2,1);
6148 @@ -3648,6 +3685,7 @@
6149 DEBUG(4,("WPrintDestEnumerate: errorcode %d\n",desc.errcode));
6150
6151 return True;
6152 +#endif
6153 }
6154
6155 static BOOL api_WPrintDriverEnum(connection_struct *conn,uint16 vuid, char *param,char *data,
6156 @@ -3655,6 +3693,9 @@
6157 char **rdata,char **rparam,
6158 int *rdata_len,int *rparam_len)
6159 {
6160 +#ifdef AVM_NO_PRINTING
6161 +return False;
6162 +#else
6163 char *str1 = param+2;
6164 char *str2 = skip_string(str1,1);
6165 char *p = skip_string(str2,1);
6166 @@ -3705,6 +3746,7 @@
6167 DEBUG(4,("WPrintDriverEnum: errorcode %d\n",desc.errcode));
6168
6169 return True;
6170 +#endif
6171 }
6172
6173 static BOOL api_WPrintQProcEnum(connection_struct *conn,uint16 vuid, char *param,char *data,
6174 @@ -3712,6 +3754,9 @@
6175 char **rdata,char **rparam,
6176 int *rdata_len,int *rparam_len)
6177 {
6178 +#ifdef AVM_NO_PRINTING
6179 +return False;
6180 +#else
6181 char *str1 = param+2;
6182 char *str2 = skip_string(str1,1);
6183 char *p = skip_string(str2,1);
6184 @@ -3763,6 +3808,7 @@
6185 DEBUG(4,("WPrintQProcEnum: errorcode %d\n",desc.errcode));
6186
6187 return True;
6188 +#endif
6189 }
6190
6191 static BOOL api_WPrintPortEnum(connection_struct *conn,uint16 vuid, char *param,char *data,
6192 @@ -3770,6 +3816,9 @@
6193 char **rdata,char **rparam,
6194 int *rdata_len,int *rparam_len)
6195 {
6196 +#ifdef AVM_NO_PRINTING
6197 +return False;
6198 +#else
6199 char *str1 = param+2;
6200 char *str2 = skip_string(str1,1);
6201 char *p = skip_string(str2,1);
6202 @@ -3822,6 +3871,7 @@
6203 DEBUG(4,("WPrintPortEnum: errorcode %d\n",desc.errcode));
6204
6205 return True;
6206 +#endif
6207 }
6208
6209
6210 diff -urN samba-3.0.24.orig/source/smbd/msdfs.c samba-3.0.24/source/smbd/msdfs.c
6211 --- samba-3.0.24.orig/source/smbd/msdfs.c 2007-02-04 19:59:13.000000000 +0100
6212 +++ samba-3.0.24/source/smbd/msdfs.c 2007-08-07 09:38:18.000000000 +0200
6213 @@ -832,9 +832,13 @@
6214
6215 /* create the referral depeding on version */
6216 DEBUG(10,("max_referral_level :%d\n",max_referral_level));
6217 - if(max_referral_level<2 || max_referral_level>3) {
6218 +
6219 + if (max_referral_level < 2) {
6220 max_referral_level = 2;
6221 }
6222 + if (max_referral_level > 3) {
6223 + max_referral_level = 3;
6224 + }
6225
6226 switch(max_referral_level) {
6227 case 2:
6228 diff -urN samba-3.0.24.orig/source/smbd/negprot.c samba-3.0.24/source/smbd/negprot.c
6229 --- samba-3.0.24.orig/source/smbd/negprot.c 2007-02-04 19:59:13.000000000 +0100
6230 +++ samba-3.0.24/source/smbd/negprot.c 2007-08-07 09:38:18.000000000 +0200
6231 @@ -263,6 +263,16 @@
6232
6233 global_encrypted_passwords_negotiated = lp_encrypted_passwords();
6234
6235 + /* Check the flags field to see if this is Vista.
6236 + WinXP sets it and Vista does not. But we have to
6237 + distinguish from NT which doesn't set it either. */
6238 +
6239 + if ( (SVAL(inbuf, smb_flg2) & FLAGS2_EXTENDED_SECURITY) &&
6240 + ((SVAL(inbuf, smb_flg2) & FLAGS2_UNKNOWN_BIT4) == 0) )
6241 + {
6242 + set_remote_arch( RA_VISTA );
6243 + }
6244 +
6245 /* do spnego in user level security if the client
6246 supports it and we can do encrypted passwords */
6247
6248 @@ -393,6 +403,15 @@
6249 protocol [LANMAN2.1]
6250 protocol [NT LM 0.12]
6251
6252 +Vista:
6253 +protocol [PC NETWORK PROGRAM 1.0]
6254 +protocol [LANMAN1.0]
6255 +protocol [Windows for Workgroups 3.1a]
6256 +protocol [LM1.2X002]
6257 +protocol [LANMAN2.1]
6258 +protocol [NT LM 0.12]
6259 +protocol [SMB 2.001]
6260 +
6261 OS/2:
6262 protocol [PC NETWORK PROGRAM 1.0]
6263 protocol [XENIX CORE]
6264 @@ -406,18 +425,19 @@
6265 *
6266 * This appears to be the matrix of which protocol is used by which
6267 * MS product.
6268 - Protocol WfWg Win95 WinNT Win2K OS/2
6269 - PC NETWORK PROGRAM 1.0 1 1 1 1 1
6270 + Protocol WfWg Win95 WinNT Win2K OS/2 Vista
6271 + PC NETWORK PROGRAM 1.0 1 1 1 1 1 1
6272 XENIX CORE 2 2
6273 MICROSOFT NETWORKS 3.0 2 2
6274 DOS LM1.2X002 3 3
6275 MICROSOFT NETWORKS 1.03 3
6276 DOS LANMAN2.1 4 4
6277 - LANMAN1.0 4 2 3
6278 - Windows for Workgroups 3.1a 5 5 5 3
6279 - LM1.2X002 6 4 4
6280 - LANMAN2.1 7 5 5
6281 - NT LM 0.12 6 8 6
6282 + LANMAN1.0 4 2 3 2
6283 + Windows for Workgroups 3.1a 5 5 5 3 3
6284 + LM1.2X002 6 4 4 4
6285 + LANMAN2.1 7 5 5 5
6286 + NT LM 0.12 6 8 6 6
6287 + SMB 2.001 7
6288 *
6289 * tim@fsg.com 09/29/95
6290 * Win2K added by matty 17/7/99
6291 @@ -430,6 +450,7 @@
6292 #define ARCH_OS2 0x14 /* Again OS/2 is like NT */
6293 #define ARCH_SAMBA 0x20
6294 #define ARCH_CIFSFS 0x40
6295 +#define ARCH_VISTA 0x8C /* Vista is like XP/2K */
6296
6297 #define ARCH_ALL 0x7F
6298
6299 @@ -493,6 +514,8 @@
6300 arch &= ( ARCH_WFWG | ARCH_WIN95 );
6301 else if (strcsequal(p,"NT LM 0.12"))
6302 arch &= ( ARCH_WIN95 | ARCH_WINNT | ARCH_WIN2K | ARCH_CIFSFS);
6303 + else if (strcsequal(p,"SMB 2.001"))
6304 + arch = ARCH_VISTA;
6305 else if (strcsequal(p,"LANMAN2.1"))
6306 arch &= ( ARCH_WINNT | ARCH_WIN2K | ARCH_OS2 );
6307 else if (strcsequal(p,"LM1.2X002"))
6308 @@ -537,7 +560,13 @@
6309 set_remote_arch(RA_WINNT);
6310 break;
6311 case ARCH_WIN2K:
6312 - set_remote_arch(RA_WIN2K);
6313 + /* Vista may have been set in the negprot so don't
6314 + override it here */
6315 + if ( get_remote_arch() != RA_VISTA )
6316 + set_remote_arch(RA_WIN2K);
6317 + break;
6318 + case ARCH_VISTA:
6319 + set_remote_arch(RA_VISTA);
6320 break;
6321 case ARCH_OS2:
6322 set_remote_arch(RA_OS2);
6323 diff -urN samba-3.0.24.orig/source/smbd/open.c samba-3.0.24/source/smbd/open.c
6324 --- samba-3.0.24.orig/source/smbd/open.c 2007-02-04 19:59:13.000000000 +0100
6325 +++ samba-3.0.24/source/smbd/open.c 2007-07-17 13:19:05.000000000 +0200
6326 @@ -1127,8 +1127,11 @@
6327 }
6328
6329 DEBUG(10, ("open_file_ntcreate: printer open fname=%s\n", fname));
6330 -
6331 +#ifdef AVM_NO_PRINTING
6332 + return NULL;
6333 +#else
6334 return print_fsp_open(conn, fname);
6335 +#endif
6336 }
6337
6338 /* We add aARCH to this as this mode is only used if the file is
6339 diff -urN samba-3.0.24.orig/source/smbd/password.c samba-3.0.24/source/smbd/password.c
6340 --- samba-3.0.24.orig/source/smbd/password.c 2007-02-04 19:59:13.000000000 +0100
6341 +++ samba-3.0.24/source/smbd/password.c 2007-07-17 13:19:05.000000000 +0200
6342 @@ -23,6 +23,8 @@
6343 /* users from session setup */
6344 static char *session_userlist = NULL;
6345 static int len_session_userlist = 0;
6346 +/* workgroup from session setup. */
6347 +static char *session_workgroup = NULL;
6348
6349 /* this holds info on user ids that are already validated for this VC */
6350 static user_struct *validated_users;
6351 @@ -406,6 +408,29 @@
6352 }
6353
6354 /****************************************************************************
6355 + In security=share mode we need to store the client workgroup, as that's
6356 + what Vista uses for the NTLMv2 calculation.
6357 +****************************************************************************/
6358 +
6359 +void add_session_workgroup(const char *workgroup)
6360 +{
6361 + if (session_workgroup) {
6362 + SAFE_FREE(session_workgroup);
6363 + }
6364 + session_workgroup = smb_xstrdup(workgroup);
6365 +}
6366 +
6367 +/****************************************************************************
6368 + In security=share mode we need to return the client workgroup, as that's
6369 + what Vista uses for the NTLMv2 calculation.
6370 +****************************************************************************/
6371 +
6372 +const char *get_session_workgroup(void)
6373 +{
6374 + return session_workgroup;
6375 +}
6376 +
6377 +/****************************************************************************
6378 Check if a user is in a netgroup user list. If at first we don't succeed,
6379 try lower case.
6380 ****************************************************************************/
6381 diff -urN samba-3.0.24.orig/source/smbd/posix_acls.c samba-3.0.24/source/smbd/posix_acls.c
6382 --- samba-3.0.24.orig/source/smbd/posix_acls.c 2007-02-04 19:59:13.000000000 +0100
6383 +++ samba-3.0.24/source/smbd/posix_acls.c 2007-08-07 09:38:18.000000000 +0200
6384 @@ -655,6 +655,7 @@
6385 }
6386 return 0;
6387 }
6388 +
6389 /****************************************************************************
6390 Function to create owner and group SIDs from a SMB_STRUCT_STAT.
6391 ****************************************************************************/
6392 @@ -666,6 +667,27 @@
6393 }
6394
6395 /****************************************************************************
6396 + Is the identity in two ACEs equal ? Check both SID and uid/gid.
6397 +****************************************************************************/
6398 +
6399 +static BOOL identity_in_ace_equal(canon_ace *ace1, canon_ace *ace2)
6400 +{
6401 + if (sid_equal(&ace1->trustee, &ace2->trustee)) {
6402 + return True;
6403 + }
6404 + if (ace1->owner_type == ace2->owner_type) {
6405 + if (ace1->owner_type == UID_ACE &&
6406 + ace1->unix_ug.uid == ace2->unix_ug.uid) {
6407 + return True;
6408 + } else if (ace1->owner_type == GID_ACE &&
6409 + ace1->unix_ug.gid == ace2->unix_ug.gid) {
6410 + return True;
6411 + }
6412 + }
6413 + return False;
6414 +}
6415 +
6416 +/****************************************************************************
6417 Merge aces with a common sid - if both are allow or deny, OR the permissions together and
6418 delete the second one. If the first is deny, mask the permissions off and delete the allow
6419 if the permissions become zero, delete the deny if the permissions are non zero.
6420 @@ -692,7 +714,7 @@
6421
6422 curr_ace_next = curr_ace->next; /* Save the link in case of delete. */
6423
6424 - if (sid_equal(&curr_ace->trustee, &curr_ace_outer->trustee) &&
6425 + if (identity_in_ace_equal(curr_ace, curr_ace_outer) &&
6426 (curr_ace->attr == curr_ace_outer->attr)) {
6427
6428 if( DEBUGLVL( 10 )) {
6429 @@ -732,7 +754,7 @@
6430 * we've put on the ACL, we know the deny must be the first one.
6431 */
6432
6433 - if (sid_equal(&curr_ace->trustee, &curr_ace_outer->trustee) &&
6434 + if (identity_in_ace_equal(curr_ace, curr_ace_outer) &&
6435 (curr_ace_outer->attr == DENY_ACE) && (curr_ace->attr == ALLOW_ACE)) {
6436
6437 if( DEBUGLVL( 10 )) {
6438 diff -urN samba-3.0.24.orig/source/smbd/process.c samba-3.0.24/source/smbd/process.c
6439 --- samba-3.0.24.orig/source/smbd/process.c 2007-02-04 19:59:13.000000000 +0100
6440 +++ samba-3.0.24/source/smbd/process.c 2007-07-17 13:19:05.000000000 +0200
6441 @@ -1008,7 +1008,9 @@
6442
6443 chain_size = 0;
6444 file_chain_reset();
6445 +#ifndef AVM_SMALLER
6446 reset_chain_p();
6447 +#endif
6448
6449 if (msg_type != 0)
6450 return(reply_special(inbuf,outbuf));
6451 @@ -1285,8 +1287,10 @@
6452 if (t != -1)
6453 select_timeout = MIN(select_timeout, t*1000);
6454
6455 +#ifndef AVM_NO_PRINTING
6456 if (print_notify_messages_pending())
6457 select_timeout = MIN(select_timeout, 1000);
6458 +#endif
6459
6460 return select_timeout;
6461 }
6462 @@ -1477,10 +1481,11 @@
6463 */
6464 process_blocking_lock_queue(t);
6465
6466 +#ifndef AVM_NO_PRINTING
6467 /* update printer queue caches if necessary */
6468 -
6469 update_monitored_printq_cache();
6470 -
6471 +#endif
6472 +
6473 /*
6474 * Check to see if we have any change notifies
6475 * outstanding on the queue.
6476 @@ -1494,9 +1499,10 @@
6477 force_check_log_size();
6478 check_log_size();
6479
6480 +#ifndef AVM_NO_PRINTING
6481 /* Send any queued printer notify message to interested smbd's. */
6482 -
6483 print_notify_send_messages(0);
6484 +#endif
6485
6486 /*
6487 * Modify the select timeout depending upon
6488 diff -urN samba-3.0.24.orig/source/smbd/reply.c samba-3.0.24/source/smbd/reply.c
6489 --- samba-3.0.24.orig/source/smbd/reply.c 2007-02-04 20:09:01.000000000 +0100
6490 +++ samba-3.0.24/source/smbd/reply.c 2007-07-17 13:19:05.000000000 +0200
6491 @@ -3599,7 +3599,10 @@
6492 int outsize = 0;
6493 files_struct *fsp;
6494 START_PROFILE(SMBsplopen);
6495 -
6496 +#ifdef AVM_NO_PRINTING
6497 + END_PROFILE(SMBsplopen);
6498 + return ERROR_DOS(ERRDOS,ERRnoaccess);
6499 +#else
6500 if (!CAN_PRINT(conn)) {
6501 END_PROFILE(SMBsplopen);
6502 return ERROR_DOS(ERRDOS,ERRnoaccess);
6503 @@ -3621,6 +3624,7 @@
6504
6505 END_PROFILE(SMBsplopen);
6506 return(outsize);
6507 +#endif
6508 }
6509
6510 /****************************************************************************
6511 @@ -3637,6 +3641,10 @@
6512
6513 CHECK_FSP(fsp,conn);
6514
6515 +#ifdef AVM_NO_PRINTING
6516 + END_PROFILE(SMBsplretq);
6517 + return ERROR_DOS(ERRDOS,ERRnoaccess);
6518 +#else
6519 if (!CAN_PRINT(conn)) {
6520 END_PROFILE(SMBsplclose);
6521 return ERROR_NT(NT_STATUS_UNSUCCESSFUL);
6522 @@ -3655,6 +3663,7 @@
6523
6524 END_PROFILE(SMBsplclose);
6525 return(outsize);
6526 +#endif
6527 }
6528
6529 /****************************************************************************
6530 @@ -3664,6 +3673,10 @@
6531 int reply_printqueue(connection_struct *conn,
6532 char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
6533 {
6534 +#ifdef AVM_NO_PRINTING
6535 + END_PROFILE(SMBsplretq);
6536 + return ERROR_DOS(ERRDOS,ERRnoaccess);
6537 +#else
6538 int outsize = set_message(outbuf,2,3,True);
6539 int max_count = SVAL(inbuf,smb_vwv0);
6540 int start_index = SVAL(inbuf,smb_vwv1);
6541 @@ -3726,6 +3739,7 @@
6542
6543 END_PROFILE(SMBsplretq);
6544 return(outsize);
6545 +#endif
6546 }
6547
6548 /****************************************************************************
6549 diff -urN samba-3.0.24.orig/source/smbd/server.c samba-3.0.24/source/smbd/server.c
6550 --- samba-3.0.24.orig/source/smbd/server.c 2007-02-04 19:59:13.000000000 +0100
6551 +++ samba-3.0.24/source/smbd/server.c 2008-02-28 11:21:14.000000000 +0100
6552 @@ -22,7 +22,7 @@
6553
6554 #include "includes.h"
6555
6556 -static_decl_rpc;
6557 +/* AR7 ???? static_decl_rpc; */
6558
6559 static int am_parent = 1;
6560
6561 @@ -41,6 +41,41 @@
6562 extern int dcelogin_atmost_once;
6563 #endif /* WITH_DFS */
6564
6565 +
6566 +
6567 +#ifdef SAMBA_DEBUG
6568 +void _fLog(char *fmt, ...)
6569 +{
6570 + va_list va;
6571 + FILE *fp = fopen("/var/tmp/smbd.log", "a");
6572 + time_t t = time(0); /* LOG */
6573 +
6574 + if (!fp) return;
6575 +
6576 + fprintf(fp, " [%d] %02u:%02u ", getpid(), (t / 60) % 60, t % 60);
6577 + va_start(va, fmt);
6578 + vfprintf(fp, fmt, va);
6579 + va_end(va);
6580 + fprintf(fp, "\n");
6581 + fclose(fp);
6582 +}
6583 +
6584 +void _fDebug(char *fmt, ...)
6585 +{
6586 + va_list va;
6587 + FILE *fp = fopen("/var/tmp/smbd.log", "a");
6588 + time_t t = time(0); /* LOG */
6589 +
6590 + if (!fp) return;
6591 +
6592 + fprintf(fp, " [%d] %02u:%02u ", getpid(), (t / 60) % 60, t % 60);
6593 + va_start(va, fmt);
6594 + vfprintf(fp, fmt, va);
6595 + va_end(va);
6596 + fclose(fp);
6597 +}
6598 +#endif
6599 +
6600 /* really we should have a top level context structure that has the
6601 client file descriptor as an element. That would require a major rewrite :(
6602
6603 @@ -523,6 +558,7 @@
6604 **************************************************************************/
6605 void reload_printers(void)
6606 {
6607 +#ifndef AVM_NO_PRINTING
6608 int snum;
6609 int n_services = lp_numservices();
6610 int pnum = lp_servicenumber(PRINTERS_NAME);
6611 @@ -549,6 +585,7 @@
6612 }
6613
6614 load_printers();
6615 +#endif /* AVM_NO_PRINTING */
6616 }
6617
6618 /****************************************************************************
6619 @@ -631,7 +668,9 @@
6620
6621 invalidate_all_vuids();
6622
6623 +#ifndef AVM_NO_PRINTING
6624 print_notify_send_messages(3); /* 3 second timeout. */
6625 +#endif
6626
6627 /* delete our entry in the connections database. */
6628 yield_connection(NULL,"");
6629 @@ -646,7 +685,9 @@
6630 #endif
6631
6632 locking_end();
6633 +#ifndef AVM_NO_PRINTING
6634 printing_end();
6635 +#endif
6636
6637 if (how != SERVER_EXIT_NORMAL) {
6638 int oldlevel = DEBUGLEVEL;
6639 @@ -729,7 +770,9 @@
6640 mkproto.h. Mixing $(builddir) and $(srcdir) source files in the current
6641 prototype generation system is too complicated. */
6642
6643 +#if 0 /* AR7 */
6644 void build_options(BOOL screen);
6645 +#endif
6646
6647 int main(int argc,const char *argv[])
6648 {
6649 @@ -741,6 +784,13 @@
6650 static BOOL log_stdout = False;
6651 static char *ports = NULL;
6652 int opt;
6653 +
6654 +#if 0 // AVM DEBUG
6655 + extern void crashdump_init(char*);
6656 + crashdump_init("smbd");
6657 +#endif
6658 +
6659 +#ifndef AVM_NO_POPT
6660 poptContext pc;
6661
6662 struct poptOption long_options[] = {
6663 @@ -750,7 +800,9 @@
6664 {"foreground", 'F', POPT_ARG_VAL, &Fork, False, "Run daemon in foreground (for daemontools, etc.)" },
6665 {"no-process-group", '\0', POPT_ARG_VAL, &no_process_group, True, "Don't create a new process group" },
6666 {"log-stdout", 'S', POPT_ARG_VAL, &log_stdout, True, "Log to stdout" },
6667 +#if 0 /* AR7 */
6668 {"build-options", 'b', POPT_ARG_NONE, NULL, 'b', "Print build options" },
6669 +#endif
6670 {"port", 'p', POPT_ARG_STRING, &ports, 0, "Listen on the specified ports"},
6671 POPT_COMMON_SAMBA
6672 POPT_COMMON_DYNCONFIG
6673 @@ -766,21 +818,31 @@
6674 pc = poptGetContext("smbd", argc, argv, long_options, 0);
6675
6676 while((opt = poptGetNextOpt(pc)) != -1) {
6677 +#if 0 /* AR7 */
6678 switch (opt) {
6679 case 'b':
6680 build_options(True); /* Display output to screen as well as debug */
6681 exit(0);
6682 break;
6683 }
6684 +#endif
6685 }
6686
6687 poptFreeContext(pc);
6688 +#else
6689 + load_case_tables();
6690 +#endif /* AVM_NO_POPT */
6691 +
6692
6693 #ifdef HAVE_SETLUID
6694 /* needed for SecureWare on SCO */
6695 setluid(0);
6696 #endif
6697
6698 +#if 1 /* AVM */
6699 + setpriority(PRIO_PROCESS, 0, 19); /* be nice */
6700 +#endif
6701 +
6702 sec_init();
6703
6704 set_remote_machine_name("smbd", False);
6705 @@ -808,6 +870,16 @@
6706 /* make absolutely sure we run as root - to handle cases where people
6707 are crazy enough to have it setuid */
6708
6709 + generate_random_buffer(NULL, 0);
6710 +
6711 + /* make absolutely sure we run as root - to handle cases where people
6712 + are crazy enough to have it setuid */
6713 +
6714 + gain_root_privilege();
6715 + gain_root_group_privilege();
6716 +
6717 + fault_setup((void (*)(void *))exit_server_fault);
6718 + dump_core_setup("smbd");
6719 gain_root_privilege();
6720 gain_root_group_privilege();
6721
6722 @@ -850,8 +922,10 @@
6723 DEBUG(2,("uid=%d gid=%d euid=%d egid=%d\n",
6724 (int)getuid(),(int)getgid(),(int)geteuid(),(int)getegid()));
6725
6726 +#if 0 /* AR7 */
6727 /* Output the build options to the debug log */
6728 build_options(False);
6729 +#endif
6730
6731 if (sizeof(uint16) < 2 || sizeof(uint32) < 4) {
6732 DEBUG(0,("ERROR: Samba is not configured correctly for the word size on your machine\n"));
6733 @@ -945,16 +1019,20 @@
6734
6735 namecache_enable();
6736
6737 +#ifndef AVM_SMALLER
6738 if (!init_registry())
6739 exit(1);
6740 +#endif
6741
6742 #if 0
6743 if (!init_svcctl_db())
6744 exit(1);
6745 #endif
6746
6747 +#ifndef AVM_NO_PRINTING
6748 if (!print_backend_init())
6749 exit(1);
6750 +#endif
6751
6752 if (!init_guest_info()) {
6753 DEBUG(0,("ERROR: failed to setup guest info.\n"));
6754 @@ -971,14 +1049,18 @@
6755 smbd is launched via inetd and we fork a copy of
6756 ourselves here */
6757
6758 +#ifndef AVM_NO_PRINTING
6759 if ( is_daemon && !interactive )
6760 start_background_queue();
6761 +#endif
6762
6763 +#if 0 /* AVM */
6764 /* Always attempt to initialize DMAPI. We will only use it later if
6765 * lp_dmapi_support is set on the share, but we need a single global
6766 * session to work with.
6767 */
6768 dmapi_init_session();
6769 +#endif
6770
6771 if (!open_sockets_smbd(is_daemon, interactive, ports))
6772 exit(1);
6773 @@ -987,7 +1069,12 @@
6774 * everything after this point is run after the fork()
6775 */
6776
6777 +#if 0 /* AR7 */
6778 static_init_rpc;
6779 +#else
6780 + rpc_wks_init();
6781 + rpc_srv_init();
6782 +#endif
6783
6784 init_modules();
6785
6786 diff -urN samba-3.0.24.orig/source/smbd/service.c samba-3.0.24/source/smbd/service.c
6787 --- samba-3.0.24.orig/source/smbd/service.c 2007-02-04 19:59:13.000000000 +0100
6788 +++ samba-3.0.24/source/smbd/service.c 2007-07-17 13:19:05.000000000 +0200
6789 @@ -254,6 +254,7 @@
6790 iService = add_home_service(service,service /* 'username' */, phome_dir);
6791 }
6792
6793 +#ifndef AVM_NO_PRINTING
6794 /* If we still don't have a service, attempt to add it as a printer. */
6795 if (iService < 0) {
6796 int iPrinterService;
6797 @@ -273,6 +274,7 @@
6798 }
6799 }
6800 }
6801 +#endif /* AVM_NO_PRINTING */
6802
6803 /* Check for default vfs service? Unsure whether to implement this */
6804 if (iService < 0) {
6805 @@ -1136,7 +1138,9 @@
6806 void close_cnum(connection_struct *conn, uint16 vuid)
6807 {
6808 if (IS_IPC(conn)) {
6809 +#ifndef AVM_SMALLER
6810 pipe_close_conn(conn);
6811 +#endif
6812 } else {
6813 file_close_conn(conn);
6814 dptr_closecnum(conn);
6815 diff -urN samba-3.0.24.orig/source/smbd/sesssetup.c samba-3.0.24/source/smbd/sesssetup.c
6816 --- samba-3.0.24.orig/source/smbd/sesssetup.c 2007-02-04 19:59:13.000000000 +0100
6817 +++ samba-3.0.24/source/smbd/sesssetup.c 2007-07-17 13:19:05.000000000 +0200
6818 @@ -1035,6 +1035,7 @@
6819
6820 map_username(sub_user);
6821 add_session_user(sub_user);
6822 + add_session_workgroup(domain);
6823 /* Then force it to null for the benfit of the code below */
6824 *user = 0;
6825 }
6826 diff -urN samba-3.0.24.orig/source/smbd/trans2.c samba-3.0.24/source/smbd/trans2.c
6827 --- samba-3.0.24.orig/source/smbd/trans2.c 2007-02-04 20:09:01.000000000 +0100
6828 +++ samba-3.0.24/source/smbd/trans2.c 2007-07-17 13:19:05.000000000 +0200
6829 @@ -2636,13 +2636,16 @@
6830 quotas.qflags = SVAL(pdata,40);
6831
6832 /* unknown_2 6 NULL bytes follow*/
6833 -
6834 +
6835 /* now set the quotas */
6836 +#if 1 /* AR7 */
6837 + return ERROR_DOS(ERRSRV,ERRerror);
6838 +#else
6839 if (vfs_set_ntquota(fsp, SMB_USER_FS_QUOTA_TYPE, NULL, &quotas)!=0) {
6840 DEBUG(0,("vfs_set_ntquota() failed for service [%s]\n",lp_servicename(SNUM(conn))));
6841 return ERROR_DOS(ERRSRV,ERRerror);
6842 }
6843 -
6844 +#endif
6845 break;
6846 }
6847 default:
6848 diff -urN samba-3.0.24.orig/source/smbd/uid.c samba-3.0.24/source/smbd/uid.c
6849 --- samba-3.0.24.orig/source/smbd/uid.c 2006-04-20 04:29:19.000000000 +0200
6850 +++ samba-3.0.24/source/smbd/uid.c 2007-08-07 09:38:18.000000000 +0200
6851 @@ -151,7 +151,9 @@
6852 char group_c;
6853 BOOL must_free_token = False;
6854 NT_USER_TOKEN *token = NULL;
6855 -
6856 + int num_groups = 0;
6857 + gid_t *group_list = NULL;
6858 +
6859 if (!conn) {
6860 DEBUG(2,("change_to_user: Connection not open\n"));
6861 return(False);
6862 @@ -190,14 +192,14 @@
6863 if (conn->force_user) /* security = share sets this too */ {
6864 uid = conn->uid;
6865 gid = conn->gid;
6866 - current_user.ut.groups = conn->groups;
6867 - current_user.ut.ngroups = conn->ngroups;
6868 + group_list = conn->groups;
6869 + num_groups = conn->ngroups;
6870 token = conn->nt_user_token;
6871 } else if (vuser) {
6872 uid = conn->admin_user ? 0 : vuser->uid;
6873 gid = vuser->gid;
6874 - current_user.ut.ngroups = vuser->n_groups;
6875 - current_user.ut.groups = vuser->groups;
6876 + num_groups = vuser->n_groups;
6877 + group_list = vuser->groups;
6878 token = vuser->nt_user_token;
6879 } else {
6880 DEBUG(2,("change_to_user: Invalid vuid used %d in accessing "
6881 @@ -230,8 +232,8 @@
6882 */
6883
6884 int i;
6885 - for (i = 0; i < current_user.ut.ngroups; i++) {
6886 - if (current_user.ut.groups[i] == conn->gid) {
6887 + for (i = 0; i < num_groups; i++) {
6888 + if (group_list[i] == conn->gid) {
6889 gid = conn->gid;
6890 gid_to_sid(&token->user_sids[1], gid);
6891 break;
6892 @@ -243,6 +245,12 @@
6893 }
6894 }
6895
6896 + /* Now set current_user since we will immediately also call
6897 + set_sec_ctx() */
6898 +
6899 + current_user.ut.ngroups = num_groups;
6900 + current_user.ut.groups = group_list;
6901 +
6902 set_sec_ctx(uid, gid, current_user.ut.ngroups, current_user.ut.groups,
6903 token);
6904
6905 diff -urN samba-3.0.24.orig/source/smbd/vfs-wrap.c samba-3.0.24/source/smbd/vfs-wrap.c
6906 --- samba-3.0.24.orig/source/smbd/vfs-wrap.c 2007-02-04 19:59:13.000000000 +0100
6907 +++ samba-3.0.24/source/smbd/vfs-wrap.c 2007-08-07 09:38:18.000000000 +0200
6908 @@ -694,6 +694,44 @@
6909 return result;
6910 }
6911
6912 +#if 1 // AVM patch - don't growth the file (too much time and RAM for copy of large files to USB1.1 FAT filesystem)
6913 + {
6914 + SMB_BIG_UINT big_len = len;
6915 +
6916 + result = SMB_VFS_FSTAT(fsp,fsp->fh->fd,&st);
6917 + if (result == -1) {
6918 + goto done;
6919 + }
6920 +
6921 + if (big_len == (SMB_BIG_UINT)st.st_size) {
6922 + result = 0;
6923 + goto done;
6924 + }
6925 +
6926 + if (big_len > (SMB_BIG_UINT)st.st_size) {
6927 + SMB_BIG_UINT space_avail;
6928 + SMB_BIG_UINT bsize,dfree,dsize;
6929 + big_len -= st.st_size;
6930 + big_len /= 1024; /* Len is now number of 1k blocks needed. */
6931 + space_avail = SMB_VFS_DISK_FREE(fsp->conn ,fsp->fsp_name,False,&bsize,&dfree,&dsize);
6932 + if (space_avail == (SMB_BIG_UINT)-1) {
6933 + result = -1;
6934 + goto done;
6935 + }
6936 +
6937 + if (big_len > space_avail) {
6938 + errno = ENOSPC;
6939 + result = -1;
6940 + goto done;
6941 + }
6942 +
6943 + // do nothing to be fast!
6944 + result = 0;
6945 + goto done;
6946 + }
6947 + } // block
6948 +#endif // AVM Patch
6949 +
6950 /* we used to just check HAVE_FTRUNCATE_EXTEND and only use
6951 sys_ftruncate if the system supports it. Then I discovered that
6952 you can have some filesystems that support ftruncate
6953 diff -urN samba-3.0.24.orig/source/utils/avm_smbpasswd.c samba-3.0.24/source/utils/avm_smbpasswd.c
6954 --- samba-3.0.24.orig/source/utils/avm_smbpasswd.c 1970-01-01 01:00:00.000000000 +0100
6955 +++ samba-3.0.24/source/utils/avm_smbpasswd.c 2007-10-23 12:27:13.000000000 +0200
6956 @@ -0,0 +1,213 @@
6957 +/*
6958 + * Unix SMB/CIFS implementation.
6959 + * Copyright (C) Jeremy Allison 1995-1998
6960 + * Copyright (C) Tim Potter 2001
6961 + *
6962 + * This program is free software; you can redistribute it and/or modify it
6963 + * under the terms of the GNU General Public License as published by the
6964 + * Free Software Foundation; either version 2 of the License, or (at your
6965 + * option) any later version.
6966 + *
6967 + * This program is distributed in the hope that it will be useful, but WITHOUT
6968 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6969 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
6970 + * more details.
6971 + *
6972 + * You should have received a copy of the GNU General Public License along with
6973 + * this program; if not, write to the Free Software Foundation, Inc., 675
6974 + * Mass Ave, Cambridge, MA 02139, USA. */
6975 +
6976 +#include "includes.h"
6977 +
6978 +
6979 +void E_md4hash(const char *passwd, uchar p16[16])
6980 +{
6981 + int len;
6982 + smb_ucs2_t wpwd[129];
6983 + int i;
6984 +
6985 +
6986 + /* Password must be converted to NT unicode - null terminated. */
6987 + len = strlen(passwd);
6988 +#if 0
6989 + push_ucs2(NULL, wpwd, (const char *)passwd, 256, STR_UNICODE|STR_NOALIGN|STR_TERMINATE);
6990 +#else
6991 + for (i = 0; i < len; i++) {
6992 + wpwd[i] = (unsigned char)passwd[i];
6993 + }
6994 + wpwd[i] = 0; // termination
6995 +#endif
6996 + /* Calculate length in bytes */
6997 + len = len /*strlen_w(wpwd)*/ * sizeof(int16);
6998 +
6999 + mdfour(p16, (unsigned char *)wpwd, len);
7000 + ZERO_STRUCT(wpwd);
7001 +}
7002 +
7003 +/**
7004 + * Creates the DES forward-only Hash of the users password in DOS ASCII charset
7005 + * @param passwd password in 'unix' charset.
7006 + * @param p16 return password hashed with DES, caller allocated 16 byte buffer
7007 + * @return False if password was > 14 characters, and therefore may be incorrect, otherwise True
7008 + * @note p16 is filled in regardless
7009 + */
7010 +
7011 +BOOL E_deshash(const char *passwd, uchar p16[16])
7012 +{
7013 + BOOL ret = True;
7014 + char dospwd[256+2];
7015 + int i;
7016 + int len;
7017 +
7018 + /* Password must be converted to DOS charset - null terminated, uppercase. */
7019 +// push_ascii(dospwd, passwd, sizeof(dospwd), STR_UPPER|STR_TERMINATE);
7020 + len = strlen(passwd);
7021 + for (i = 0; i < len; i++) {
7022 + char c = passwd[i];
7023 + if (islower(c)) c = toupper(c);
7024 + dospwd[i] = c;
7025 + }
7026 + dospwd[i] = 0;
7027 +
7028 + /* Only the fisrt 14 chars are considered, password need not be null terminated. */
7029 + E_P16((const unsigned char *)dospwd, p16);
7030 +
7031 + if (strlen(dospwd) > 14) {
7032 + ret = False;
7033 + }
7034 +
7035 + memset(dospwd, 0, sizeof(dospwd));
7036 + // ZERO_STRUCT(dospwd);
7037 +
7038 + return ret;
7039 +}
7040 +
7041 +static void my_pdb_sethexpwd(char *p, const unsigned char *pwd)
7042 +{
7043 + if (pwd != NULL) {
7044 + int i;
7045 + for (i = 0; i < 16; i++)
7046 + slprintf(&p[i*2], 3, "%02X", pwd[i]);
7047 + } else {
7048 + strncpy(p, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 32);
7049 + }
7050 +}
7051 +
7052 +static void crypt_password (const char *user_name,
7053 + const char *new_passwd, char *new_lanman_p16, char *new_nt_p16)
7054 +{
7055 + /* Calculate the MD4 hash (NT compatible) of the password */
7056 + E_md4hash(new_passwd, new_nt_p16);
7057 +
7058 + if (!E_deshash(new_passwd, new_lanman_p16)) {
7059 + /* E_deshash returns false for 'long' passwords (> 14
7060 + DOS chars). This allows us to match Win2k, which
7061 + does not store a LM hash for these passwords (which
7062 + would reduce the effective password length to 14 */
7063 +
7064 + memset(new_lanman_p16, 0, LM_HASH_LEN);
7065 + }
7066 +}
7067 +
7068 +/*
7069 +ftpuser:1000:8C6F5D02DEB21501AAD3B435B51404EE:E0FBA38268D0EC66EF1CB452D5885E53:[UX ]:LCT-00000000:
7070 +*/
7071 +
7072 +/*********************************************************
7073 + Start here.
7074 +**********************************************************/
7075 +int main(int argc, char **argv)
7076 +{
7077 + char *passwd_filename = "/var/samba/private/smbpasswd";
7078 + char *cleartext_filename = "/var/tmp/smbpasswd.cleartext";
7079 +
7080 + if (argc != 1) {
7081 + fprintf(stderr, "use: smbpasswd\n");
7082 + fprintf(stderr, " file %s will be encrypted to %s\n", cleartext_filename, passwd_filename);
7083 + return -9;
7084 + }
7085 +
7086 + FILE *fp = fopen(passwd_filename, "w");
7087 +
7088 + if (fp == NULL) {
7089 + fprintf(stderr, "can't write %s\n", passwd_filename);
7090 + return -10;
7091 + }
7092 + /* Make sure it is only rw by the owner */
7093 + chmod(passwd_filename, 0600);
7094 +
7095 +
7096 + FILE *fp_in = fopen(cleartext_filename, "r");
7097 + if (!fp_in) {
7098 + fprintf(stderr, "can't read %s\n", cleartext_filename);
7099 + fclose(fp);
7100 + return -11;
7101 + }
7102 +
7103 +
7104 + char line[512];
7105 +
7106 + unsigned nusers = 0;
7107 + while(line == fgets(line, sizeof(line)-1, fp_in)) {
7108 + char *username, *passwd, *extra;
7109 + unsigned uid;
7110 + uchar new_lanman_p16[LM_HASH_LEN];
7111 + uchar new_nt_p16[NT_HASH_LEN];
7112 + char ascii_p16[32+1];
7113 + char *p;
7114 +
7115 + line[sizeof(line)-1] = '\0';
7116 + if (strlen(line)) {
7117 + p = &line[strlen(line)-1];
7118 + while(p >= line) {
7119 + if (*p != '\n' && *p != '\r') break;
7120 + *p = '\0';
7121 + p--;
7122 + }
7123 + }
7124 +
7125 + p = line;
7126 + char *p2 = strchr(p, ':');
7127 + if (!p2) goto err;
7128 + *p2 = 0;
7129 + username = p;
7130 +
7131 + p = p2 + 1;
7132 + p2 = strchr(p, ':');
7133 + if (!p2) goto err;
7134 + *p2 = 0;
7135 + uid = atoi(p);
7136 +
7137 + p = p2 + 1;
7138 + p2 = strchr(p, ':');
7139 + if (!p2) goto err;
7140 + *p2 = 0;
7141 + passwd = p;
7142 +
7143 + extra = p2 + 1;
7144 +
7145 + crypt_password(username, passwd, new_lanman_p16, new_nt_p16);
7146 +
7147 + fprintf(fp, "%s:%u:", username, uid);
7148 +
7149 + my_pdb_sethexpwd(ascii_p16, new_lanman_p16);
7150 + ascii_p16[32] = '\0';
7151 + fprintf(fp, "%s:", ascii_p16);
7152 +
7153 + my_pdb_sethexpwd(ascii_p16, new_nt_p16);
7154 + ascii_p16[32] = '\0';
7155 + fprintf(fp, "%s:", ascii_p16);
7156 +
7157 + fprintf(fp, "%s\n", extra);
7158 +
7159 + nusers++;
7160 + } // while
7161 +
7162 +err:
7163 + fclose(fp_in);
7164 + fclose(fp);
7165 +
7166 +fprintf(stderr, "%u samba users written to %s\n", nusers, passwd_filename);
7167 + return 0;
7168 +}
7169 +
7170 diff -urN samba-3.0.24.orig/source/utils/ntlm_auth_proto.h samba-3.0.24/source/utils/ntlm_auth_proto.h
7171 --- samba-3.0.24.orig/source/utils/ntlm_auth_proto.h 1970-01-01 01:00:00.000000000 +0100
7172 +++ samba-3.0.24/source/utils/ntlm_auth_proto.h 2007-07-17 13:19:05.000000000 +0200
7173 @@ -0,0 +1,28 @@
7174 +#ifndef _NTLM_AUTH_PROTO_H_
7175 +#define _NTLM_AUTH_PROTO_H_
7176 +
7177 +/* This file is automatically generated with "make proto". DO NOT EDIT */
7178 +
7179 +
7180 +/* The following definitions come from utils/ntlm_auth.c */
7181 +
7182 +const char *get_winbind_domain(void);
7183 +const char *get_winbind_netbios_name(void);
7184 +DATA_BLOB get_challenge(void) ;
7185 +NTSTATUS contact_winbind_auth_crap(const char *username,
7186 + const char *domain,
7187 + const char *workstation,
7188 + const DATA_BLOB *challenge,
7189 + const DATA_BLOB *lm_response,
7190 + const DATA_BLOB *nt_response,
7191 + uint32 flags,
7192 + uint8 lm_key[8],
7193 + uint8 user_session_key[16],
7194 + char **error_string,
7195 + char **unix_name) ;
7196 +
7197 +/* The following definitions come from utils/ntlm_auth_diagnostics.c */
7198 +
7199 +BOOL diagnose_ntlm_auth(void);
7200 +
7201 +#endif /* _NTLM_AUTH_PROTO_H_ */