Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

Location:
vendor/current/source4/ntvfs/sysdep
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source4/ntvfs/sysdep/inotify.c

    r414 r988  
    3030#include "param/param.h"
    3131
    32 #if HAVE_SYS_INOTIFY_H
    3332#include <sys/inotify.h>
    34 #else
    35 /* for older glibc varients - we can remove this eventually */
    36 #include <linux/inotify.h>
    37 #include <asm/unistd.h>
    38 
    39 #ifndef HAVE_INOTIFY_INIT
    40 /*
    41   glibc doesn't define these functions yet (as of March 2006)
    42 */
    43 static int inotify_init(void)
    44 {
    45         return syscall(__NR_inotify_init);
    46 }
    47 
    48 static int inotify_add_watch(int fd, const char *path, __u32 mask)
    49 {
    50         return syscall(__NR_inotify_add_watch, fd, path, mask);
    51 }
    52 
    53 static int inotify_rm_watch(int fd, int wd)
    54 {
    55         return syscall(__NR_inotify_rm_watch, fd, wd);
    56 }
    57 #endif
    58 #endif
    59 
    60 
    61 /* older glibc headers don't have these defines either */
     33
     34/* glibc < 2.5 headers don't have these defines */
    6235#ifndef IN_ONLYDIR
    6336#define IN_ONLYDIR 0x01000000
     
    172145                next = w->next;
    173146                if (w->wd == e->wd && filter_match(w, e)) {
     147                        ne.dir = w->path;
    174148                        w->callback(in->ctx, w->private_data, &ne);
    175149                }
     
    191165                if (w->wd == e->wd && filter_match(w, e) &&
    192166                    !(w->filter & FILE_NOTIFY_CHANGE_CREATION)) {
     167                        ne.dir = w->path;
    193168                        w->callback(in->ctx, w->private_data, &ne);
    194169                }
     
    259234                DEBUG(0,("Failed to init inotify - %s\n", strerror(errno)));
    260235                talloc_free(in);
    261                 return map_nt_error_from_unix(errno);
     236                return map_nt_error_from_unix_common(errno);
    262237        }
    263238        in->ctx = ctx;
     
    275250                DEBUG(0,("Failed to tevent_add_fd() - %s\n", strerror(errno)));
    276251                talloc_free(in);
    277                 return map_nt_error_from_unix(errno);
     252                return map_nt_error_from_unix_common(errno);
    278253        }
    279254
     
    374349        if (wd == -1) {
    375350                e->filter = filter;
    376                 return map_nt_error_from_unix(errno);
     351                return map_nt_error_from_unix_common(errno);
    377352        }
    378353
     
    416391  initialialise the inotify module
    417392 */
     393NTSTATUS sys_notify_inotify_init(void);
    418394NTSTATUS sys_notify_inotify_init(void)
    419395{
  • vendor/current/source4/ntvfs/sysdep/sys_lease.c

    r740 r988  
    2828#include "../lib/util/dlinklist.h"
    2929#include "param/param.h"
     30#include "lib/util/samba_modules.h"
    3031
    3132/* list of registered backends */
     
    4142                                                            TALLOC_CTX *mem_ctx,
    4243                                                            struct tevent_context *ev,
    43                                                             struct messaging_context *msg,
     44                                                            struct imessaging_context *msg,
    4445                                                            sys_lease_send_break_fn break_send)
    4546{
     
    4849        int i;
    4950        NTSTATUS status;
     51        TALLOC_CTX * tmp_ctx;
    5052
    5153        if (num_backends == 0) {
     
    6264        }
    6365
     66        tmp_ctx = talloc_new(ctx);
     67        if (tmp_ctx == NULL) {
     68                return NULL;
     69        }
     70
    6471        ctx->event_ctx = ev;
    6572        ctx->msg_ctx = msg;
    6673        ctx->break_send = break_send;
    6774
    68         bname = share_string_option(scfg, LEASE_BACKEND, NULL);
     75        bname = share_string_option(tmp_ctx, scfg, LEASE_BACKEND, NULL);
    6976        if (!bname) {
    7077                talloc_free(ctx);
     
    9097        }
    9198
     99        TALLOC_FREE(tmp_ctx);
    92100        return ctx;
    93101}
  • vendor/current/source4/ntvfs/sysdep/sys_lease.h

    r414 r988  
    2222struct sys_lease_context;
    2323struct opendb_entry;
    24 struct messaging_context;
     24struct imessaging_context;
    2525struct tevent_context;
    2626
    27 typedef NTSTATUS (*sys_lease_send_break_fn)(struct messaging_context *,
     27typedef NTSTATUS (*sys_lease_send_break_fn)(struct imessaging_context *,
    2828                                            struct opendb_entry *,
    2929                                            uint8_t level);
     
    4242struct sys_lease_context {
    4343        struct tevent_context *event_ctx;
    44         struct messaging_context *msg_ctx;
     44        struct imessaging_context *msg_ctx;
    4545        sys_lease_send_break_fn break_send;
    4646        void *private_data; /* for use of backend */
     
    5454                                                   TALLOC_CTX *mem_ctx,
    5555                                                   struct tevent_context *ev,
    56                                                    struct messaging_context *msg_ctx,
     56                                                   struct imessaging_context *msg_ctx,
    5757                                                   sys_lease_send_break_fn break_send);
    5858
  • vendor/current/source4/ntvfs/sysdep/sys_lease_linux.c

    r414 r988  
    3030#include "../lib/util/dlinklist.h"
    3131#include "cluster/cluster.h"
     32
     33NTSTATUS sys_lease_linux_init(void);
    3234
    3335#define LINUX_LEASE_RT_SIGNAL (SIGRTMIN+1)
     
    130132        if (ret == -1) {
    131133                talloc_free(p);
    132                 return map_nt_error_from_unix(errno);
     134                return map_nt_error_from_unix_common(errno);
    133135        }
    134136
     
    136138        if (ret == -1) {
    137139                talloc_free(p);
    138                 return map_nt_error_from_unix(errno);
     140                return map_nt_error_from_unix_common(errno);
    139141        }
    140142
  • vendor/current/source4/ntvfs/sysdep/sys_notify.c

    r740 r988  
    2929#include "../lib/util/dlinklist.h"
    3030#include "param/param.h"
     31#include "lib/util/samba_modules.h"
    3132
    3233/* list of registered backends */
     
    6263        ctx->ev = ev;
    6364
    64         bname = share_string_option(scfg, NOTIFY_BACKEND, NULL);
     65        bname = share_string_option(ctx, scfg, NOTIFY_BACKEND, NULL);
    6566        if (!bname) {
    6667                if (num_backends) {
  • vendor/current/source4/ntvfs/sysdep/sys_notify.h

    r740 r988  
    1818*/
    1919
    20 #include "librpc/gen_ndr/s4_notify.h"
     20#include "librpc/gen_ndr/notify.h"
    2121#include "param/share.h"
    2222
  • vendor/current/source4/ntvfs/sysdep/wscript_build

    r740 r988  
    55                 subsystem='sys_notify',
    66                 init_function='sys_notify_inotify_init',
    7                  deps='events',
     7                 deps='events inotify',
    88                 enabled = bld.CONFIG_SET('HAVE_LINUX_INOTIFY')
    99                 )
  • vendor/current/source4/ntvfs/sysdep/wscript_configure

    r740 r988  
    11#!/usr/bin/env python
    22
    3 conf.CHECK_HEADERS('linux/inotify.h asm/unistd.h sys/inotify.h', add_headers=False)
     3import sys
    44
    5 conf.CHECK_FUNCS('inotify_init')
     5# Check for inotify support (Skip if we are SunOS)
     6#NOTE: illumos provides sys/inotify.h but is not an exact match for linux
     7host_os = sys.platform
     8if host_os.rfind('sunos') == -1:
     9    conf.CHECK_HEADERS('sys/inotify.h', add_headers=False)
     10    if (conf.CONFIG_SET('HAVE_SYS_INOTIFY_H')):
     11        conf.DEFINE('HAVE_LINUX_INOTIFY', 1)
    612
    7 conf.CHECK_VARIABLE('__NR_inotify_init')
    813conf.CHECK_DECLS('F_SETLEASE', headers='linux/fcntl.h', reverse=True)
    914conf.CHECK_DECLS('SA_SIGINFO', headers='signal.h', reverse=True)
    10 
    11 conf.CHECK_DECLS('__NR_inotify_init', reverse=True, headers='asm/unistd.h')
    12 
    13 if (conf.CONFIG_SET('HAVE___NR_INOTIFY_INIT') and
    14     (conf.CONFIG_SET('HAVE_LINUX_INOTIFY_H') or
    15      conf.CONFIG_SET('HAVE_SYS_INOTIFY_H'))):
    16     conf.DEFINE('HAVE_LINUX_INOTIFY', 1)
Note: See TracChangeset for help on using the changeset viewer.