The branch, master has been updated
       via  f0e75484a7a4fc5646f7fed6cfb736a009526f59 (commit)
       via  6ed83d3d4533ff7a290f1e674e5e82895319d18d (commit)
       via  2736650f0ca55d9d9f47e689a8848902c11ccec2 (commit)
       via  70f55ddb7012f8cc44520088949bdfa4484c3a8b (commit)
       via  afd57a16d87bbe5d7fd447742c693d6f185206a9 (commit)
      from  172628dca2b8553b8b7273a645393d5c96daa67e (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit f0e75484a7a4fc5646f7fed6cfb736a009526f59
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Thu Nov 20 13:33:24 2008 +0100

    s3-eventlog: remove trailing whitespace.
    
    Guenther

commit 6ed83d3d4533ff7a290f1e674e5e82895319d18d
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Thu Nov 20 13:30:34 2008 +0100

    s3-build: re-run make samba3-idl.
    
    Guenther

commit 2736650f0ca55d9d9f47e689a8848902c11ccec2
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Thu Nov 20 13:29:44 2008 +0100

    eventlog: fill in some unknowns and use flags bitmap in IDL.
    
    Guenther

commit 70f55ddb7012f8cc44520088949bdfa4484c3a8b
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Thu Nov 20 10:55:03 2008 +0100

    s3-eventlog: avoid passing down full prs_struct in eventlog server.
    
    Guenther

commit afd57a16d87bbe5d7fd447742c693d6f185206a9
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Wed Nov 19 23:44:07 2008 +0100

    s3-eventlog: move non rpc eventlog headers to own include file.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 librpc/idl/eventlog.idl                   |    8 +-
 source3/include/{mapping.h => eventlog.h} |   41 +++++++----
 source3/include/includes.h                |    1 +
 source3/include/rpc_eventlog.h            |   23 ------
 source3/librpc/gen_ndr/cli_eventlog.c     |    8 +-
 source3/librpc/gen_ndr/cli_eventlog.h     |    4 +-
 source3/librpc/gen_ndr/eventlog.h         |    4 +-
 source3/librpc/gen_ndr/ndr_eventlog.c     |   43 +++++++++---
 source3/librpc/gen_ndr/ndr_eventlog.h     |    1 +
 source3/rpc_server/srv_eventlog_nt.c      |  108 ++++++++++++++--------------
 source4/torture/rpc/eventlog.c            |    4 +-
 11 files changed, 129 insertions(+), 116 deletions(-)
 copy source3/include/{mapping.h => eventlog.h} (55%)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/eventlog.idl b/librpc/idl/eventlog.idl
index ce25dd6..bab4cb9 100644
--- a/librpc/idl/eventlog.idl
+++ b/librpc/idl/eventlog.idl
@@ -11,7 +11,7 @@ import "lsa.idl", "security.idl";
   helpstring("Event Logger")
 ] interface eventlog
 {
-       typedef bitmap {
+       typedef [bitmap32bit] bitmap {
                EVENTLOG_SEQUENTIAL_READ = 0x0001,
                EVENTLOG_SEEK_READ       = 0x0002,
                EVENTLOG_FORWARDS_READ   = 0x0004,
@@ -100,8 +100,8 @@ import "lsa.idl", "security.idl";
                [in,unique]         eventlog_OpenUnknown0 *unknown0,
                [in,ref]    lsa_String *logname,
                [in,ref]    lsa_String *servername,
-               [in]        uint32 unknown2,
-               [in]        uint32 unknown3,
+               [in]        uint32 major_version,
+               [in]        uint32 minor_version,
                [out]   policy_handle *handle
        );
 
@@ -117,7 +117,7 @@ import "lsa.idl", "security.idl";
        /* Function: 0x0a */
        NTSTATUS eventlog_ReadEventLogW(
                [in] policy_handle *handle,
-               [in] uint32 flags,
+               [in] eventlogReadFlags flags,
                [in] uint32 offset,
                [in] [range(0,0x7FFFF)] uint32 number_of_bytes,
                [out,ref,size_is(number_of_bytes)] uint8 *data,
diff --git a/source3/include/mapping.h b/source3/include/eventlog.h
similarity index 55%
copy from source3/include/mapping.h
copy to source3/include/eventlog.h
index 75459fc..16affe3 100644
--- a/source3/include/mapping.h
+++ b/source3/include/eventlog.h
@@ -1,32 +1,41 @@
-/* 
+/*
  *  Unix SMB/CIFS implementation.
  *  RPC Pipe client / server routines
- *  Copyright (C) Andrew Tridgell              1992-2000,
- *  Copyright (C) Jean François Micouleau      1998-2001.
- *  
+ *  Copyright (C) Marcin Krzysztof Porwit    2005.
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#define ENUM_ONLY_MAPPED True
-#define ENUM_ALL_MAPPED False
+/* Defines for TDB keys */
+#define  EVT_OLDEST_ENTRY  "INFO/oldest_entry"
+#define  EVT_NEXT_RECORD   "INFO/next_record"
+#define  EVT_VERSION       "INFO/version"
+#define  EVT_MAXSIZE       "INFO/maxsize"
+#define  EVT_RETENTION     "INFO/retention"
 
-typedef struct _GROUP_MAP {
-       struct pdb_methods *methods;
-       gid_t gid;
-       DOM_SID sid;
-       enum lsa_SidType sid_name_use;
-       fstring nt_name;
-       fstring comment;
-} GROUP_MAP;
+#define ELOG_APPL      "Application"
+#define ELOG_SYS       "System"
+#define ELOG_SEC       "Security"
 
+typedef struct elog_tdb {
+       struct elog_tdb *prev, *next;
+       char *name;
+       TDB_CONTEXT *tdb;
+       int ref_count;
+} ELOG_TDB;
+
+#define ELOG_TDB_CTX(x) ((x)->tdb)
+
+
+#define  EVENTLOG_DATABASE_VERSION_V1    1
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 4399c73..38d6ec0 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -654,6 +654,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void 
*lp_ctx);
 #include "async_smb.h"
 #include "async_sock.h"
 #include "services.h"
+#include "eventlog.h"
 
 #include "lib/smbconf/smbconf.h"
 
diff --git a/source3/include/rpc_eventlog.h b/source3/include/rpc_eventlog.h
index 3f5d03e..f17e448 100644
--- a/source3/include/rpc_eventlog.h
+++ b/source3/include/rpc_eventlog.h
@@ -35,29 +35,6 @@
 /* Event types */
 /* defined in librpc/gen_ndr/eventlog.h */
 
-/* Defines for TDB keys */
-#define  EVT_OLDEST_ENTRY  "INFO/oldest_entry"
-#define  EVT_NEXT_RECORD   "INFO/next_record"
-#define  EVT_VERSION       "INFO/version"
-#define  EVT_MAXSIZE       "INFO/maxsize"
-#define  EVT_RETENTION     "INFO/retention"
-
-#define ELOG_APPL      "Application"
-#define ELOG_SYS       "System"
-#define ELOG_SEC       "Security"
-
-typedef struct elog_tdb {
-       struct elog_tdb *prev, *next;
-       char *name;
-       TDB_CONTEXT *tdb;
-       int ref_count;
-} ELOG_TDB;
-
-#define ELOG_TDB_CTX(x) ((x)->tdb)
-
-
-#define  EVENTLOG_DATABASE_VERSION_V1    1
-
 /***********************************/
 
 typedef struct 
diff --git a/source3/librpc/gen_ndr/cli_eventlog.c 
b/source3/librpc/gen_ndr/cli_eventlog.c
index 08456fc..02d8fb2 100644
--- a/source3/librpc/gen_ndr/cli_eventlog.c
+++ b/source3/librpc/gen_ndr/cli_eventlog.c
@@ -278,8 +278,8 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct 
rpc_pipe_client *cli,
                                       struct eventlog_OpenUnknown0 *unknown0 
/* [in] [unique] */,
                                       struct lsa_String *logname /* [in] [ref] 
*/,
                                       struct lsa_String *servername /* [in] 
[ref] */,
-                                      uint32_t unknown2 /* [in]  */,
-                                      uint32_t unknown3 /* [in]  */,
+                                      uint32_t major_version /* [in]  */,
+                                      uint32_t minor_version /* [in]  */,
                                       struct policy_handle *handle /* [out] 
[ref] */)
 {
        struct eventlog_OpenEventLogW r;
@@ -289,8 +289,8 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct 
rpc_pipe_client *cli,
        r.in.unknown0 = unknown0;
        r.in.logname = logname;
        r.in.servername = servername;
-       r.in.unknown2 = unknown2;
-       r.in.unknown3 = unknown3;
+       r.in.major_version = major_version;
+       r.in.minor_version = minor_version;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW, &r);
diff --git a/source3/librpc/gen_ndr/cli_eventlog.h 
b/source3/librpc/gen_ndr/cli_eventlog.h
index 6945683..0594a06 100644
--- a/source3/librpc/gen_ndr/cli_eventlog.h
+++ b/source3/librpc/gen_ndr/cli_eventlog.h
@@ -27,8 +27,8 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client 
*cli,
                                       struct eventlog_OpenUnknown0 *unknown0 
/* [in] [unique] */,
                                       struct lsa_String *logname /* [in] [ref] 
*/,
                                       struct lsa_String *servername /* [in] 
[ref] */,
-                                      uint32_t unknown2 /* [in]  */,
-                                      uint32_t unknown3 /* [in]  */,
+                                      uint32_t major_version /* [in]  */,
+                                      uint32_t minor_version /* [in]  */,
                                       struct policy_handle *handle /* [out] 
[ref] */);
 NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli,
                                              TALLOC_CTX *mem_ctx);
diff --git a/source3/librpc/gen_ndr/eventlog.h 
b/source3/librpc/gen_ndr/eventlog.h
index 0fd929d..76b9e86 100644
--- a/source3/librpc/gen_ndr/eventlog.h
+++ b/source3/librpc/gen_ndr/eventlog.h
@@ -131,8 +131,8 @@ struct eventlog_OpenEventLogW {
                struct eventlog_OpenUnknown0 *unknown0;/* [unique] */
                struct lsa_String *logname;/* [ref] */
                struct lsa_String *servername;/* [ref] */
-               uint32_t unknown2;
-               uint32_t unknown3;
+               uint32_t major_version;
+               uint32_t minor_version;
        } in;
 
        struct {
diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c 
b/source3/librpc/gen_ndr/ndr_eventlog.c
index f0c7ee4..12fa9fc 100644
--- a/source3/librpc/gen_ndr/ndr_eventlog.c
+++ b/source3/librpc/gen_ndr/ndr_eventlog.c
@@ -5,6 +5,31 @@
 
 #include "librpc/gen_ndr/ndr_lsa.h"
 #include "librpc/gen_ndr/ndr_security.h"
+static enum ndr_err_code ndr_push_eventlogReadFlags(struct ndr_push *ndr, int 
ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_eventlogReadFlags(struct ndr_pull *ndr, int 
ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_eventlogReadFlags(struct ndr_print *ndr, const char 
*name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
"EVENTLOG_SEQUENTIAL_READ", EVENTLOG_SEQUENTIAL_READ, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_SEEK_READ", 
EVENTLOG_SEEK_READ, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_FORWARDS_READ", 
EVENTLOG_FORWARDS_READ, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_BACKWARDS_READ", 
EVENTLOG_BACKWARDS_READ, r);
+       ndr->depth--;
+}
+
 static enum ndr_err_code ndr_push_eventlog_OpenUnknown0(struct ndr_push *ndr, 
int ndr_flags, const struct eventlog_OpenUnknown0 *r)
 {
        if (ndr_flags & NDR_SCALARS) {
@@ -635,8 +660,8 @@ static enum ndr_err_code 
ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, i
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, 
"NULL [ref] pointer");
                }
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, 
r->in.servername));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
r->in.major_version));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
r->in.minor_version));
        }
        if (flags & NDR_OUT) {
                if (r->out.handle == NULL) {
@@ -684,8 +709,8 @@ static enum ndr_err_code 
ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, i
                NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 
LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, 
r->in.servername));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 
LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, 
&r->in.major_version));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, 
&r->in.minor_version));
                NDR_PULL_ALLOC(ndr, r->out.handle);
                ZERO_STRUCTP(r->out.handle);
        }
@@ -726,8 +751,8 @@ _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct 
ndr_print *ndr, const char
                ndr->depth++;
                ndr_print_lsa_String(ndr, "servername", r->in.servername);
                ndr->depth--;
-               ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
-               ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
+               ndr_print_uint32(ndr, "major_version", r->in.major_version);
+               ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
@@ -832,7 +857,7 @@ static enum ndr_err_code 
ndr_push_eventlog_ReadEventLogW(struct ndr_push *ndr, i
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, 
"NULL [ref] pointer");
                }
                NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, 
r->in.handle));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
+               NDR_CHECK(ndr_push_eventlogReadFlags(ndr, NDR_SCALARS, 
r->in.flags));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offset));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
r->in.number_of_bytes));
        }
@@ -870,7 +895,7 @@ static enum ndr_err_code 
ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, i
                NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, 
r->in.handle));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, 
LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+               NDR_CHECK(ndr_pull_eventlogReadFlags(ndr, NDR_SCALARS, 
&r->in.flags));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offset));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, 
&r->in.number_of_bytes));
                if (r->in.number_of_bytes < 0 || r->in.number_of_bytes > 
0x7FFFF) {
@@ -925,7 +950,7 @@ _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct 
ndr_print *ndr, const char
                ndr->depth++;
                ndr_print_policy_handle(ndr, "handle", r->in.handle);
                ndr->depth--;
-               ndr_print_uint32(ndr, "flags", r->in.flags);
+               ndr_print_eventlogReadFlags(ndr, "flags", r->in.flags);
                ndr_print_uint32(ndr, "offset", r->in.offset);
                ndr_print_uint32(ndr, "number_of_bytes", r->in.number_of_bytes);
                ndr->depth--;
diff --git a/source3/librpc/gen_ndr/ndr_eventlog.h 
b/source3/librpc/gen_ndr/ndr_eventlog.h
index 6c6e679..6002f35 100644
--- a/source3/librpc/gen_ndr/ndr_eventlog.h
+++ b/source3/librpc/gen_ndr/ndr_eventlog.h
@@ -60,6 +60,7 @@ extern const struct ndr_interface_table ndr_table_eventlog;
 #define NDR_EVENTLOG_FLUSHEVENTLOG (0x17)
 
 #define NDR_EVENTLOG_CALL_COUNT (24)
+void ndr_print_eventlogReadFlags(struct ndr_print *ndr, const char *name, 
uint32_t r);
 void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char *name, 
const struct eventlog_OpenUnknown0 *r);
 enum ndr_err_code ndr_push_eventlog_Record(struct ndr_push *ndr, int 
ndr_flags, const struct eventlog_Record *r);
 enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int 
ndr_flags, struct eventlog_Record *r);
diff --git a/source3/rpc_server/srv_eventlog_nt.c 
b/source3/rpc_server/srv_eventlog_nt.c
index 71257df..612db1c 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -1,20 +1,20 @@
-/* 
+/*
  *  Unix SMB/CIFS implementation.
  *  RPC Pipe client / server routines
  *  Copyright (C) Marcin Krzysztof Porwit    2005,
  *  Copyright (C) Brian Moran                2005,
  *  Copyright (C) Gerald (Jerry) Carter      2005.
- *  
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
@@ -40,10 +40,10 @@ typedef struct {
 static void free_eventlog_info( void *ptr )
 {
        EVENTLOG_INFO *elog = (EVENTLOG_INFO *)ptr;
-       
+
        if ( elog->etdb )
                elog_close_tdb( elog->etdb, False );
-       
+
        TALLOC_FREE( elog );
 }
 
@@ -72,21 +72,21 @@ static bool elog_check_access( EVENTLOG_INFO *info, 
NT_USER_TOKEN *token )
        char *tdbname = elog_tdbname(talloc_tos(), info->logname );
        SEC_DESC *sec_desc;
        NTSTATUS status;
-       
-       if ( !tdbname ) 
+
+       if ( !tdbname )
                return False;
-       
+
        /* get the security descriptor for the file */
-       
+
        sec_desc = get_nt_acl_no_snum( info, tdbname );
        TALLOC_FREE( tdbname );
-       
+
        if ( !sec_desc ) {
-               DEBUG(5,("elog_check_access: Unable to get NT ACL for %s\n", 
+               DEBUG(5,("elog_check_access: Unable to get NT ACL for %s\n",
                        tdbname));
                return False;
        }
-       
+
        /* root free pass */
 
        if ( geteuid() == sec_initial_uid() ) {
@@ -95,21 +95,21 @@ static bool elog_check_access( EVENTLOG_INFO *info, 
NT_USER_TOKEN *token )
        }
 
        /* run the check, try for the max allowed */
-       
+
        status = se_access_check( sec_desc, token, MAXIMUM_ALLOWED_ACCESS,
                &info->access_granted);
-               
+
        if ( sec_desc )
                TALLOC_FREE( sec_desc );
-               
+
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(8,("elog_check_access: se_access_check() return %s\n",
                        nt_errstr(status)));
                return False;
        }
-       
+
        /* we have to have READ permission for a successful open */
-       
+
        return ( info->access_granted & SA_RIGHT_FILE_READ_DATA );
 }
 
@@ -120,7 +120,7 @@ static bool elog_validate_logname( const char *name )
 {
        int i;
        const char **elogs = lp_eventlog_list();
-       
+
        if (!elogs) {
                return False;
        }
@@ -129,7 +129,7 @@ static bool elog_validate_logname( const char *name )
                if ( strequal( name, elogs[i] ) )
                        return True;
        }
-       
+
        return False;
 }
 
@@ -178,19 +178,19 @@ static bool get_oldest_entry_hook( EVENTLOG_INFO * info )
 static NTSTATUS elog_open( pipes_struct * p, const char *logname, POLICY_HND 
*hnd )
 {
        EVENTLOG_INFO *elog;
-       
+
        /* first thing is to validate the eventlog name */
        
        if ( !elog_validate_logname( logname ) )
                return NT_STATUS_OBJECT_PATH_INVALID;
-       
+
        if ( !(elog = TALLOC_ZERO_P( NULL, EVENTLOG_INFO )) )
                return NT_STATUS_NO_MEMORY;
-               
+
        elog->logname = talloc_strdup( elog, logname );
-       
+
        /* Open the tdb first (so that we can create any new tdbs if necessary).
-          We have to do this as root and then use an internal access check 
+          We have to do this as root and then use an internal access check
           on the file permissions since you can only have a tdb open once
           in a single process */
 
@@ -201,30 +201,30 @@ static NTSTATUS elog_open( pipes_struct * p, const char 
*logname, POLICY_HND *hn
        if ( !elog->etdb ) {
                /* according to MSDN, if the logfile cannot be found, we should
                  default to the "Application" log */
-       
+
                if ( !strequal( logname, ELOG_APPL ) ) {
-               
+
                        TALLOC_FREE( elog->logname );
-                       
-                       elog->logname = talloc_strdup( elog, ELOG_APPL );       
                
+
+                       elog->logname = talloc_strdup( elog, ELOG_APPL );
 
                        /* do the access check */
                        if ( !elog_check_access( elog, 
p->pipe_user.nt_user_token ) ) {
                                TALLOC_FREE( elog );
                                return NT_STATUS_ACCESS_DENIED;
                        }
-       
+
                        become_root();
                        elog->etdb = elog_open_tdb( elog->logname, False );
                        unbecome_root();
-               }       
-               
+               }
+
                if ( !elog->etdb ) {
                        TALLOC_FREE( elog );
-                       return NT_STATUS_ACCESS_DENIED; /* ??? */               
+                       return NT_STATUS_ACCESS_DENIED; /* ??? */
                }
        }
-       
+
        /* now do the access check.  Close the tdb if we fail here */
 
        if ( !elog_check_access( elog, p->pipe_user.nt_user_token ) ) {
@@ -232,9 +232,9 @@ static NTSTATUS elog_open( pipes_struct * p, const char 
*logname, POLICY_HND *hn
                TALLOC_FREE( elog );
                return NT_STATUS_ACCESS_DENIED;
        }
-       
+
        /* create the policy handle */
-       
+
        if ( !create_policy_hnd
             ( p, hnd, free_eventlog_info, ( void * ) elog ) ) {


-- 
Samba Shared Repository

Reply via email to