~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

Viewing changes to source4/heimdal/lib/roken/roken-common.h

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
#ifndef ROKEN_LIB_FUNCTION
40
40
#ifdef _WIN32
41
 
#define ROKEN_LIB_FUNCTION _stdcall
 
41
#define ROKEN_LIB_FUNCTION
 
42
#define ROKEN_LIB_CALL     __cdecl
42
43
#else
43
44
#define ROKEN_LIB_FUNCTION
 
45
#define ROKEN_LIB_CALL
44
46
#endif
45
47
#endif
46
48
 
120
122
#define O_ACCMODE       003
121
123
#endif
122
124
 
 
125
#ifndef _WIN32
 
126
 
123
127
#ifndef _PATH_DEV
124
128
#define _PATH_DEV "/dev/"
125
129
#endif
144
148
#define MAXPATHLEN (1024+4)
145
149
#endif
146
150
 
 
151
#endif  /* !_WIN32 */
 
152
 
 
153
#ifndef PATH_MAX
 
154
#define PATH_MAX MAX_PATH
 
155
#endif
 
156
 
 
157
#ifndef RETSIGTYPE
 
158
#define RETSIGTYPE void
 
159
#endif
 
160
 
147
161
#ifndef SIG_ERR
148
162
#define SIG_ERR ((RETSIGTYPE (*)(int))-1)
149
163
#endif
207
221
#define AI_NUMERICHOST  0x04
208
222
#endif
209
223
 
 
224
#ifndef AI_NUMERICSERV
 
225
#define AI_NUMERICSERV  0x08
 
226
#endif
 
227
 
210
228
/* flags for getnameinfo() */
211
229
 
212
230
#ifndef NI_DGRAM
261
279
ROKEN_CPP_START
262
280
 
263
281
#ifndef IRIX4 /* fix for compiler bug */
 
282
#ifndef _WIN32
264
283
#ifdef RETSIGTYPE
265
284
typedef RETSIGTYPE (*SigAction)(int);
266
285
SigAction signal(int iSig, SigAction pAction); /* BSD compatible */
267
286
#endif
268
287
#endif
 
288
#endif
 
289
 
 
290
#define SE_E_UNSPECIFIED (-1)
 
291
#define SE_E_FORKFAILED  (-2)
 
292
#define SE_E_WAITPIDFAILED (-3)
 
293
#define SE_E_EXECTIMEOUT (-4)
 
294
#define SE_E_NOEXEC   126
 
295
#define SE_E_NOTFOUND 127
 
296
 
 
297
#define SE_PROCSTATUS(st) (((st) >= 0 && (st) < 126)? st: -1)
 
298
#define SE_PROCSIGNAL(st) (((st) >= 128)? (st) - 128: -1)
 
299
#define SE_IS_ERROR(st) ((st) < 0 || (st) >= 126)
 
300
 
269
301
 
270
302
#define simple_execve rk_simple_execve
271
 
int ROKEN_LIB_FUNCTION
 
303
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
272
304
simple_execve(const char*, char*const[], char*const[]);
273
305
 
274
306
#define simple_execve_timed rk_simple_execve_timed
275
 
int ROKEN_LIB_FUNCTION
 
307
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
276
308
simple_execve_timed(const char *, char *const[],
277
309
                    char *const [], time_t (*)(void *),
278
310
                    void *, time_t);
279
311
 
280
312
#define simple_execvp rk_simple_execvp
281
 
int ROKEN_LIB_FUNCTION
 
313
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
282
314
simple_execvp(const char*, char *const[]);
283
315
 
284
316
#define simple_execvp_timed rk_simple_execvp_timed
285
 
int ROKEN_LIB_FUNCTION
 
317
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
286
318
simple_execvp_timed(const char *, char *const[],
287
319
                    time_t (*)(void *), void *, time_t);
288
320
 
289
321
#define simple_execlp rk_simple_execlp
290
 
int ROKEN_LIB_FUNCTION
 
322
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
291
323
simple_execlp(const char*, ...);
292
324
 
293
325
#define simple_execle rk_simple_execle
294
 
int ROKEN_LIB_FUNCTION
 
326
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
295
327
simple_execle(const char*, ...);
296
328
 
297
329
#define wait_for_process rk_wait_for_process
298
 
int ROKEN_LIB_FUNCTION
 
330
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
299
331
wait_for_process(pid_t);
300
332
 
301
333
#define wait_for_process_timed rk_wait_for_process_timed
302
 
int ROKEN_LIB_FUNCTION
 
334
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
303
335
wait_for_process_timed(pid_t, time_t (*)(void *),
304
 
                                              void *, time_t);
 
336
                       void *, time_t);
 
337
 
305
338
#define pipe_execv rk_pipe_execv
306
 
int ROKEN_LIB_FUNCTION
 
339
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
307
340
pipe_execv(FILE**, FILE**, FILE**, const char*, ...);
308
341
 
309
342
#define print_version rk_print_version
310
 
void ROKEN_LIB_FUNCTION
 
343
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
311
344
print_version(const char *);
312
345
 
313
346
#define eread rk_eread
314
 
ssize_t ROKEN_LIB_FUNCTION
 
347
ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
315
348
eread (int fd, void *buf, size_t nbytes);
316
349
 
317
350
#define ewrite rk_ewrite
318
 
ssize_t ROKEN_LIB_FUNCTION
 
351
ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
319
352
ewrite (int fd, const void *buf, size_t nbytes);
320
353
 
321
354
struct hostent;
322
355
 
323
356
#define hostent_find_fqdn rk_hostent_find_fqdn
324
 
const char * ROKEN_LIB_FUNCTION
 
357
ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL
325
358
hostent_find_fqdn (const struct hostent *);
326
359
 
327
360
#define esetenv rk_esetenv
328
 
void ROKEN_LIB_FUNCTION
 
361
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
329
362
esetenv(const char *, const char *, int);
330
363
 
331
364
#define socket_set_address_and_port rk_socket_set_address_and_port
332
 
void ROKEN_LIB_FUNCTION
 
365
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
333
366
socket_set_address_and_port (struct sockaddr *, const void *, int);
334
367
 
335
368
#define socket_addr_size rk_socket_addr_size
336
 
size_t ROKEN_LIB_FUNCTION
 
369
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
337
370
socket_addr_size (const struct sockaddr *);
338
371
 
339
372
#define socket_set_any rk_socket_set_any
340
 
void ROKEN_LIB_FUNCTION
 
373
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
341
374
socket_set_any (struct sockaddr *, int);
342
375
 
343
376
#define socket_sockaddr_size rk_socket_sockaddr_size
344
 
size_t ROKEN_LIB_FUNCTION
 
377
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
345
378
socket_sockaddr_size (const struct sockaddr *);
346
379
 
347
380
#define socket_get_address rk_socket_get_address
348
 
void * ROKEN_LIB_FUNCTION
 
381
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
349
382
socket_get_address (const struct sockaddr *);
350
383
 
351
384
#define socket_get_port rk_socket_get_port
352
 
int ROKEN_LIB_FUNCTION
 
385
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
353
386
socket_get_port (const struct sockaddr *);
354
387
 
355
388
#define socket_set_port rk_socket_set_port
356
 
void ROKEN_LIB_FUNCTION
 
389
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
357
390
socket_set_port (struct sockaddr *, int);
358
391
 
359
392
#define socket_set_portrange rk_socket_set_portrange
360
 
void ROKEN_LIB_FUNCTION
361
 
socket_set_portrange (int, int, int);
 
393
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
 
394
socket_set_portrange (rk_socket_t, int, int);
362
395
 
363
396
#define socket_set_debug rk_socket_set_debug
364
 
void ROKEN_LIB_FUNCTION
365
 
socket_set_debug (int);
 
397
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
 
398
socket_set_debug (rk_socket_t);
366
399
 
367
400
#define socket_set_tos rk_socket_set_tos
368
 
void ROKEN_LIB_FUNCTION
369
 
socket_set_tos (int, int);
 
401
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
 
402
socket_set_tos (rk_socket_t, int);
370
403
 
371
404
#define socket_set_reuseaddr rk_socket_set_reuseaddr
372
 
void ROKEN_LIB_FUNCTION
373
 
socket_set_reuseaddr (int, int);
 
405
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
 
406
socket_set_reuseaddr (rk_socket_t, int);
374
407
 
375
408
#define socket_set_ipv6only rk_socket_set_ipv6only
376
 
void ROKEN_LIB_FUNCTION
377
 
socket_set_ipv6only (int, int);
 
409
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
 
410
socket_set_ipv6only (rk_socket_t, int);
 
411
 
 
412
#define socket_to_fd rk_socket_to_fd
 
413
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
 
414
socket_to_fd(rk_socket_t, int);
378
415
 
379
416
#define vstrcollect rk_vstrcollect
380
 
char ** ROKEN_LIB_FUNCTION
 
417
ROKEN_LIB_FUNCTION char ** ROKEN_LIB_CALL
381
418
vstrcollect(va_list *ap);
382
419
 
383
420
#define strcollect rk_strcollect
384
 
char ** ROKEN_LIB_FUNCTION
 
421
ROKEN_LIB_FUNCTION char ** ROKEN_LIB_CALL
385
422
strcollect(char *first, ...);
386
423
 
387
424
#define timevalfix rk_timevalfix
388
 
void ROKEN_LIB_FUNCTION
 
425
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
389
426
timevalfix(struct timeval *t1);
390
427
 
391
428
#define timevaladd rk_timevaladd
392
 
void ROKEN_LIB_FUNCTION
 
429
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
393
430
timevaladd(struct timeval *t1, const struct timeval *t2);
394
431
 
395
432
#define timevalsub rk_timevalsub
396
 
void ROKEN_LIB_FUNCTION
 
433
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
397
434
timevalsub(struct timeval *t1, const struct timeval *t2);
398
435
 
399
436
#define pid_file_write rk_pid_file_write
400
 
char *ROKEN_LIB_FUNCTION
 
437
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL
401
438
pid_file_write (const char *progname);
402
439
 
403
440
#define pid_file_delete rk_pid_file_delete
404
 
void ROKEN_LIB_FUNCTION
 
441
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
405
442
pid_file_delete (char **);
406
443
 
407
444
#define read_environment rk_read_environment
408
 
int ROKEN_LIB_FUNCTION
 
445
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
409
446
read_environment(const char *file, char ***env);
410
447
 
411
448
#define free_environment rk_free_environment
412
 
void ROKEN_LIB_FUNCTION
 
449
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
413
450
free_environment(char **);
414
451
 
415
452
#define warnerr rk_warnerr
416
 
void ROKEN_LIB_FUNCTION
 
453
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
417
454
rk_warnerr(int doerrno, const char *fmt, va_list ap)
418
455
    __attribute__ ((format (printf, 2, 0)));
419
456
 
420
 
void * ROKEN_LIB_FUNCTION
 
457
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
421
458
rk_realloc(void *, size_t);
422
459
 
423
460
struct rk_strpool;
424
461
 
425
 
char * ROKEN_LIB_FUNCTION
 
462
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL
426
463
rk_strpoolcollect(struct rk_strpool *);
427
464
 
428
 
struct rk_strpool * ROKEN_LIB_FUNCTION
 
465
ROKEN_LIB_FUNCTION struct rk_strpool * ROKEN_LIB_CALL
429
466
rk_strpoolprintf(struct rk_strpool *, const char *, ...)
430
467
    __attribute__ ((format (printf, 2, 3)));
431
468
 
432
 
void ROKEN_LIB_FUNCTION
 
469
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
433
470
rk_strpoolfree(struct rk_strpool *);
434
471
 
435
 
void ROKEN_LIB_FUNCTION
 
472
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
436
473
rk_dumpdata (const char *, const void *, size_t);
437
474
 
438
 
int ROKEN_LIB_FUNCTION
 
475
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
439
476
rk_undumpdata (const char *, void **, size_t *);
440
477
 
441
 
void ROKEN_LIB_FUNCTION
 
478
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
442
479
rk_xfree (void *);
443
480
 
444
 
void ROKEN_LIB_FUNCTION
 
481
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
445
482
rk_cloexec(int);
446
483
 
447
 
void ROKEN_LIB_FUNCTION
 
484
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
448
485
rk_cloexec_file(FILE *);
449
486
 
 
487
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
 
488
rk_cloexec_dir(DIR *);
 
489
 
 
490
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
 
491
ct_memcmp(const void *, const void *, size_t);
 
492
 
 
493
void ROKEN_LIB_FUNCTION
 
494
rk_random_init(void);
450
495
 
451
496
ROKEN_CPP_END
452
497