The branch, v3-2-test has been updated
       via  9ccac8abb0420393569dbca73e7daf2742aa1099 (commit)
      from  f9c8d62389f8cb47837e5360209936176537df13 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 9ccac8abb0420393569dbca73e7daf2742aa1099
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Mon Dec 3 17:57:46 2007 -0800

    Remove more pstrings, from the winbindd protocol def and
    inside winbindd. Remove unused pstring types.
    Jeremy.

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

Summary of changes:
 source/include/smb.h                      |    4 ----
 source/nsswitch/winbind_struct_protocol.h |    6 +++---
 source/winbindd/winbindd.h                |    8 ++++----
 source/winbindd/winbindd_dual.c           |   13 +++++++++----
 4 files changed, 16 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/smb.h b/source/include/smb.h
index f85c734..1d787f5 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -150,10 +150,6 @@ typedef union unid_t {
 
 typedef uint16 smb_ucs2_t;
 
-/* ucs2 string types. */
-typedef smb_ucs2_t wpstring[PSTRING_LEN];
-typedef smb_ucs2_t wfstring[FSTRING_LEN];
-
 #ifdef WORDS_BIGENDIAN
 #define UCS2_SHIFT 8
 #else
diff --git a/source/nsswitch/winbind_struct_protocol.h 
b/source/nsswitch/winbind_struct_protocol.h
index 0e3ad8b..e780cad 100644
--- a/source/nsswitch/winbind_struct_protocol.h
+++ b/source/nsswitch/winbind_struct_protocol.h
@@ -243,10 +243,10 @@ struct winbindd_request {
                struct {
                        /* We deliberatedly don't split into domain/user to
                            avoid having the client know what the separator
-                           character is. */    
+                           character is. */
                        fstring user;
                        fstring pass;
-                       pstring require_membership_of_sid;
+                       char require_membership_of_sid[1024];
                        fstring krb5_cc_type;
                        uid_t uid;
                } auth;              /* pam_winbind auth module */
@@ -287,7 +287,7 @@ struct winbindd_request {
                fstring sid;         /* lookupsid, sid_to_[ug]id */
                struct {
                        fstring dom_name;       /* lookupname */
-                       fstring name;       
+                       fstring name;
                } name;
                uint32_t num_entries;  /* getpwent, getgrent */
                struct {
diff --git a/source/winbindd/winbindd.h b/source/winbindd/winbindd.h
index 454a4b9..248bcff 100644
--- a/source/winbindd/winbindd.h
+++ b/source/winbindd/winbindd.h
@@ -150,7 +150,7 @@ struct winbindd_child {
 
        pid_t pid;
        struct winbindd_domain *domain;
-       pstring logfilename;
+       char *logfilename;
 
        struct fd_event event;
        struct timed_event *lockout_policy_event;
@@ -166,8 +166,8 @@ struct winbindd_domain {
        fstring alt_name;                      /* alt Domain name, if any (FQDN 
for ADS) */
        fstring forest_name;                   /* Name of the AD forest we're 
in */
        DOM_SID sid;                           /* SID for this domain */
-       uint32 domain_flags;                   /* Domain flags from rpc_ds.h */ 
-       uint32 domain_type;                    /* Domain type from rpc_ds.h */  
+       uint32 domain_flags;                   /* Domain flags from rpc_ds.h */
+       uint32 domain_type;                    /* Domain type from rpc_ds.h */
        uint32 domain_trust_attribs;           /* Trust attribs from rpc_ds.h */
        bool initialized;                      /* Did we already ask for the 
domain mode? */
        bool native_mode;                      /* is this a win2k domain in 
native mode ? */
@@ -187,7 +187,7 @@ struct winbindd_domain {
 
         /* Private data for the backends (used for connection cache) */
 
-       void *private_data; 
+       void *private_data;
 
        /* A working DC */
        fstring dcname;
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index c15af71..91e60cc 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -471,11 +471,15 @@ void setup_domain_child(struct winbindd_domain *domain,
                        const char *explicit_logfile)
 {
        if (explicit_logfile != NULL) {
-               pstr_sprintf(child->logfilename, "%s/log.winbindd-%s",
-                            dyn_LOGFILEBASE, explicit_logfile);
+               if (asprintf(&child->logfilename, "%s/log.winbindd-%s",
+                            dyn_LOGFILEBASE, explicit_logfile) < 0) {
+                       smb_panic("Internal error: asprintf failed");
+               }
        } else if (domain != NULL) {
-               pstr_sprintf(child->logfilename, "%s/log.wb-%s",
-                            dyn_LOGFILEBASE, domain->name);
+               if (asprintf(&child->logfilename, "%s/log.wb-%s",
+                            dyn_LOGFILEBASE, domain->name) < 0) {
+                       smb_panic("Internal error: asprintf failed");
+               }
        } else {
                smb_panic("Internal error: domain == NULL && "
                          "explicit_logfile == NULL");
@@ -507,6 +511,7 @@ void winbind_child_died(pid_t pid)
        child->event.fd = 0;
        child->event.flags = 0;
        child->pid = 0;
+       SAFE_FREE(child->logfilename);
 
        schedule_async_request(child);
 }


-- 
Samba Shared Repository

Reply via email to