The branch, master has been updated
       via  d0739d4 s3: Remove talloc_autofree_context() from nametouid()
       via  d4bfb5c s3: Remove talloc_autofree_context() from guest_user_info()
       via  227945d s3: Remove talloc_autofree_context() from getpwnam_alloc()
       via  3b2efdc s3: Remove talloc_autofree_context() from 
notify_internal_parent_init()
      from  03841f9 Fix bug #7698 - Assert causes smbd to panic on invalid 
NetBIOS session request.

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


- Log -----------------------------------------------------------------
commit d0739d436e50f23ce8378cd3645f6cac74afbc13
Author: Volker Lendecke <[email protected]>
Date:   Sat Sep 25 19:21:56 2010 -0700

    s3: Remove talloc_autofree_context() from nametouid()
    
    pass is freed a few lines down

commit d4bfb5c48847fa73cdf10ede0d72b90ac45a1ef1
Author: Volker Lendecke <[email protected]>
Date:   Sat Sep 25 19:18:46 2010 -0700

    s3: Remove talloc_autofree_context() from guest_user_info()
    
    pwd is freed a few lines down

commit 227945d31c23b2b76c312cef73370865e1722f3a
Author: Volker Lendecke <[email protected]>
Date:   Sat Sep 25 19:16:53 2010 -0700

    s3: Remove talloc_autofree_context() from getpwnam_alloc()
    
    This is given to the memcache a few lines down

commit 3b2efdc7d7fe1346e363e6df679624150a0f95d7
Author: Volker Lendecke <[email protected]>
Date:   Sat Sep 25 18:34:03 2010 -0700

    s3: Remove talloc_autofree_context() from notify_internal_parent_init()

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

Summary of changes:
 source3/include/proto.h        |    2 +-
 source3/lib/util.c             |    2 +-
 source3/lib/util_pw.c          |    2 +-
 source3/passdb/pdb_interface.c |    3 ++-
 source3/smbd/notify_internal.c |    7 +++----
 source3/smbd/server.c          |    2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1687186..1aefe66 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4949,7 +4949,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, 
struct server_id server,
                                   struct messaging_context *messaging_ctx,
                                   struct event_context *ev,
                                   connection_struct *conn);
-bool notify_internal_parent_init(void);
+bool notify_internal_parent_init(TALLOC_CTX *mem_ctx);
 NTSTATUS notify_add(struct notify_context *notify, struct notify_entry *e0,
                    void (*callback)(void *, const struct notify_event *), 
                    void *private_data);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 2833651..90fcb37 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1306,7 +1306,7 @@ uid_t nametouid(const char *name)
        char *p;
        uid_t u;
 
-       pass = getpwnam_alloc(talloc_autofree_context(), name);
+       pass = getpwnam_alloc(talloc_tos(), name);
        if (pass) {
                u = pass->pw_uid;
                TALLOC_FREE(pass);
diff --git a/source3/lib/util_pw.c b/source3/lib/util_pw.c
index 4d4041c..5ba5fde 100644
--- a/source3/lib/util_pw.c
+++ b/source3/lib/util_pw.c
@@ -58,7 +58,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char 
*name)
                return NULL;
        }
 
-       for_cache = tcopy_passwd(talloc_autofree_context(), pw);
+       for_cache = tcopy_passwd(talloc_tos(), pw);
        if (for_cache == NULL) {
                return NULL;
        }
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 9f3a172..11b70f2 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -352,7 +352,8 @@ static bool guest_user_info( struct samu *user )
        NTSTATUS result;
        const char *guestname = lp_guestaccount();
 
-       if ( !(pwd = getpwnam_alloc(talloc_autofree_context(), guestname ) ) ) {
+       pwd = getpwnam_alloc(talloc_tos(), guestname);
+       if (pwd == NULL) {
                DEBUG(0,("guest_user_info: Unable to locate guest account 
[%s]!\n", 
                        guestname));
                return False;
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index d1475d2..1dc10bb 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -130,7 +130,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, 
struct server_id server,
        return notify;
 }
 
-bool notify_internal_parent_init(void)
+bool notify_internal_parent_init(TALLOC_CTX *mem_ctx)
 {
        struct tdb_wrap *db1, *db2;
 
@@ -144,15 +144,14 @@ bool notify_internal_parent_init(void)
         * work.
         */
 
-       db1 = tdb_wrap_open(talloc_autofree_context(), lock_path("notify.tdb"),
+       db1 = tdb_wrap_open(mem_ctx, lock_path("notify.tdb"),
                            0, TDB_SEQNUM|TDB_CLEAR_IF_FIRST,
                           O_RDWR|O_CREAT, 0644);
        if (db1 == NULL) {
                DEBUG(1, ("could not open notify.tdb: %s\n", strerror(errno)));
                return false;
        }
-       db2 = tdb_wrap_open(talloc_autofree_context(),
-                           lock_path("notify_onelevel.tdb"),
+       db2 = tdb_wrap_open(mem_ctx, lock_path("notify_onelevel.tdb"),
                            0, TDB_CLEAR_IF_FIRST, O_RDWR|O_CREAT, 0644);
        if (db2 == NULL) {
                DEBUG(1, ("could not open notify_onelevel.tdb: %s\n",
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 2322d1f..6cc7907 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1130,7 +1130,7 @@ extern void build_options(bool screen);
                exit(1);
        }
 
-       if (!notify_internal_parent_init()) {
+       if (!notify_internal_parent_init(smbd_event_context())) {
                exit(1);
        }
 


-- 
Samba Shared Repository

Reply via email to