[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-32-161-ga922805

2009-03-20 Thread Volker Lendecke
The branch, v3-0-test has been updated
   via  a92280537071b5a9a9bc56fbeead14c6874d5a55 (commit)
  from  bdf46ea491801cdf8ff6f42c0a1ef51080cfc410 (commit)

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


- Log -
commit a92280537071b5a9a9bc56fbeead14c6874d5a55
Author: Bhaskar Jain (bhajain) 
Date:   Fri Mar 20 08:11:30 2009 +0100

prevent segmentation fault on joining a very long domain name in 
samba-3.0.32

For a detailed explanation, see
http://lists.samba.org/archive/samba-technical/2009-March/063626.html

---

Summary of changes:
 source/libads/cldap.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libads/cldap.c b/source/libads/cldap.c
index 3cb98c5..e01b00b 100644
--- a/source/libads/cldap.c
+++ b/source/libads/cldap.c
@@ -60,7 +60,7 @@ static unsigned pull_netlogon_string(char *ret, const char 
*ptr,
ret_len += 2;
followed_ptr = 1;
}
-   len = ((ptr[0] & 0x3f) << 8) | ptr[1];
+   len = ((ptr[0] & 0x3f) << 8) | (uint8) ptr[1];
ptr = data + len;
} else if (*ptr) {
uint8 len = (uint8)*(ptr++);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-601-g808928c

2009-03-20 Thread Volker Lendecke
The branch, master has been updated
   via  808928c24ba409a3fad50cbadf1db5a9dac9ad91 (commit)
  from  37f130fd89d02e77bf55cbd8da731d87bb4ab1e8 (commit)

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


- Log -
commit 808928c24ba409a3fad50cbadf1db5a9dac9ad91
Author: Bo Yang 
Date:   Wed Mar 4 18:10:20 2009 +0800

Fix crash in async_smb.c

---

Summary of changes:
 source3/libsmb/async_smb.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index e579d1c..066ac7b 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -861,7 +861,7 @@ static NTSTATUS validate_smb_crypto(struct cli_state *cli, 
char *pdu)
 
 static void handle_incoming_pdu(struct cli_state *cli)
 {
-   struct cli_request *req;
+   struct cli_request *req, *next;
uint16_t mid;
size_t raw_pdu_len, buf_len, pdu_len, rest_len;
char *pdu;
@@ -978,8 +978,11 @@ static void handle_incoming_pdu(struct cli_state *cli)
DEBUG(10, ("handle_incoming_pdu: Aborting with %s\n",
   nt_errstr(status)));
 
-   for (req = cli->outstanding_requests; req; req = req->next) {
-   async_req_nterror(req->async[0], status);
+   for (req = cli->outstanding_requests; req; req = next) {
+   next = req->next;
+   if (req->num_async) {
+   async_req_nterror(req->async[0], status);
+   }
}
return;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-539-gb20cace

2009-03-20 Thread Volker Lendecke
The branch, v3-4-test has been updated
   via  b20cace3a7c312f44f39390954bc087b888d9b27 (commit)
  from  a75c184cafbb80adb0a3b056e55608d2d263a0c6 (commit)

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


- Log -
commit b20cace3a7c312f44f39390954bc087b888d9b27
Author: Bo Yang 
Date:   Wed Mar 4 18:10:20 2009 +0800

Fix crash in async_smb.c

---

Summary of changes:
 source3/libsmb/async_smb.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index e579d1c..066ac7b 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -861,7 +861,7 @@ static NTSTATUS validate_smb_crypto(struct cli_state *cli, 
char *pdu)
 
 static void handle_incoming_pdu(struct cli_state *cli)
 {
-   struct cli_request *req;
+   struct cli_request *req, *next;
uint16_t mid;
size_t raw_pdu_len, buf_len, pdu_len, rest_len;
char *pdu;
@@ -978,8 +978,11 @@ static void handle_incoming_pdu(struct cli_state *cli)
DEBUG(10, ("handle_incoming_pdu: Aborting with %s\n",
   nt_errstr(status)));
 
-   for (req = cli->outstanding_requests; req; req = req->next) {
-   async_req_nterror(req->async[0], status);
+   for (req = cli->outstanding_requests; req; req = next) {
+   next = req->next;
+   if (req->num_async) {
+   async_req_nterror(req->async[0], status);
+   }
}
return;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-602-gda46c37

2009-03-20 Thread Stefan Metzmacher
The branch, master has been updated
   via  da46c371006d7cb5bceba790070d805b303ade98 (commit)
  from  808928c24ba409a3fad50cbadf1db5a9dac9ad91 (commit)

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


- Log -
commit da46c371006d7cb5bceba790070d805b303ade98
Author: Stefan Metzmacher 
Date:   Fri Mar 20 10:14:35 2009 +0100

s4:build: include ../libcli/cldap/config.mk

This fixes commit 84a140f18722518eb0f40737085dd3b3958a3a02,
sorry!

metze

---

Summary of changes:
 source4/main.mk |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/main.mk b/source4/main.mk
index a143604..d7db058 100644
--- a/source4/main.mk
+++ b/source4/main.mk
@@ -46,6 +46,7 @@ mkinclude torture/config.mk
 mkinclude librpc/config.mk
 mkinclude client/config.mk
 mkinclude libcli/config.mk
+mkinclude ../libcli/cldap/config.mk
 mkinclude scripting/python/config.mk
 mkinclude kdc/config.mk
 mkinclude ../lib/smbconf/config.mk


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-603-g842edcd

2009-03-20 Thread Günther Deschner
The branch, master has been updated
   via  842edcd2b08763a35dbdea3518fcc039aa70aad4 (commit)
  from  da46c371006d7cb5bceba790070d805b303ade98 (commit)

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


- Log -
commit 842edcd2b08763a35dbdea3518fcc039aa70aad4
Author: Günther Deschner 
Date:   Thu Nov 27 17:49:25 2008 +0100

s3-samr: try to to fix password_expired flag handling.

Guenther

---

Summary of changes:
 source3/include/proto.h|6 ++
 source3/rpc_server/srv_samr_nt.c   |  120 +---
 source3/rpc_server/srv_samr_util.c |   87 +-
 3 files changed, 161 insertions(+), 52 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3d87f75..d815448 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5898,6 +5898,8 @@ NTSTATUS np_read_recv(struct tevent_req *req, ssize_t 
*nread,
 
 /* The following definitions come from rpc_server/srv_samr_util.c  */
 
+void copy_id18_to_sam_passwd(struct samu *to,
+struct samr_UserInfo18 *from);
 void copy_id20_to_sam_passwd(struct samu *to,
 struct samr_UserInfo20 *from);
 void copy_id21_to_sam_passwd(const char *log_prefix,
@@ -5905,8 +5907,12 @@ void copy_id21_to_sam_passwd(const char *log_prefix,
 struct samr_UserInfo21 *from);
 void copy_id23_to_sam_passwd(struct samu *to,
 struct samr_UserInfo23 *from);
+void copy_id24_to_sam_passwd(struct samu *to,
+struct samr_UserInfo24 *from);
 void copy_id25_to_sam_passwd(struct samu *to,
 struct samr_UserInfo25 *from);
+void copy_id26_to_sam_passwd(struct samu *to,
+struct samr_UserInfo26 *from);
 
 /* The following definitions come from rpc_server/srv_spoolss_nt.c  */
 
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index dcbd096..c60d904 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -3636,12 +3636,7 @@ static NTSTATUS set_user_info_18(struct samr_UserInfo18 
*id18,
pdb_set_pass_last_set_time(pwd, time(NULL), PDB_CHANGED);
}
 
-   if (id18->password_expired) {
-   pdb_set_pass_last_set_time(pwd, 0, PDB_CHANGED);
-   } else {
-   /* FIXME */
-   pdb_set_pass_last_set_time(pwd, time(NULL), PDB_CHANGED);
-   }
+   copy_id18_to_sam_passwd(pwd, id18);
 
return pdb_update_sam_account(pwd);
 }
@@ -3848,23 +3843,16 @@ static NTSTATUS set_user_info_23(TALLOC_CTX *mem_ctx,
  set_user_info_pw
  /
 
-static bool set_user_info_pw(uint8 *pass, struct samu *pwd,
-int level)
+static bool set_user_info_pw(uint8 *pass, struct samu *pwd)
 {
uint32 len = 0;
char *plaintext_buf = NULL;
uint32 acct_ctrl;
-   time_t last_set_time;
-   enum pdb_value_state last_set_state;
 
DEBUG(5, ("Attempting administrator password change for user %s\n",
  pdb_get_username(pwd)));
 
acct_ctrl = pdb_get_acct_ctrl(pwd);
-   /* we need to know if it's expired, because this is an admin change, 
not a
-  user change, so it's still expired when we're done */
-   last_set_state = pdb_get_init_flags(pwd, PDB_PASSLASTSET);
-   last_set_time = pdb_get_pass_last_set_time(pwd);
 
if (!decode_pw_buffer(talloc_tos(),
pass,
@@ -3907,29 +3895,38 @@ static bool set_user_info_pw(uint8 *pass, struct samu 
*pwd,
 
memset(plaintext_buf, '\0', strlen(plaintext_buf));
 
-   /*
-* A level 25 change does reset the pwdlastset field, a level 24
-* change does not. I know this is probably not the full story, but
-* it is needed to make XP join LDAP correctly, without it the later
-* auth2 check can fail with PWD_MUST_CHANGE.
-*/
-   if (level != 25) {
-   /*
-* restore last set time as this is an admin change, not a
-* user pw change
-*/
-   pdb_set_pass_last_set_time (pwd, last_set_time,
-   last_set_state);
+   DEBUG(5,("set_user_info_pw: pdb_update_pwd()\n"));
+
+   return True;
+}
+
+/***
+ set_user_info_24
+ /
+
+static NTSTATUS set_user_info_24(TALLOC_CTX *mem_ctx,
+struct samr_UserInfo24 *id24,
+struct samu *pwd)
+{
+   NTSTATUS status;
+
+

Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-557-gd380c49

2009-03-20 Thread Stefan (metze) Metzmacher
Hi Tridge,

>  > > fixed a logic bug in the tevent nesting code
>  > > 
>  > > The event nesting code never triggered as nesting.level was never
>  > > greater than 1. The main event loop needs to increase the nesting
>  > > level by 1.
>  > 
>  > That was desired, why do you want to be called if there's no nesting?
>  > you do if (unixuid_nesting_level == 0) return; anyway.
> 
> The code as it was previously would only call the hook if we had two
> levels of nesting. ie. it would call it when we had this:
> 
>  - main loop
>- call to event_loop_once
>  - call to event_loop_once
>- calls hook

tevent_loop_wait() calls tevent_loop_once() internally,
see the tevent_common_loop_once() function.

so for samba it was:

level 1: tevent_loop_wait() (internally also tevent_loop_once())
level 2:   tevent_loop_once() -> calling the hook with level == 2.
level 3: tevent_loop_once() -> callling the hook with level == 3.
...

for smbtorture it was:

level 1: tevent_loop_once()
level 2:   tevent_loop_once() -> calling the hook with level == 2.
level 3: tevent_loop_once() -> calling the hook with level == 3.

Currently we call the hook for each level, but the above was my first
design. Now we have the question if we want to call the hook at
level > 1, or if we want to call it always and let the hook decide if it
makes level 1 a noop.

> It was just a simple off by 1 error, as the check was for > 1, which
> meant it only triggered when the nesting was 2 or greater. It started
> at zero. 
> 
>  > If we change it to call the hook at level 0, we should change that in
>  > tevent_loop_once() and not in tevent_loop_wait().
> 
> no, because then we'll get the hook code called in top level code that
> calls event_loop_once, such as the smbtorture code.
> 
>  > > I also added a paranoia check to the nesting setup call. The API as
>  > > currently written cannot support multiple nesting hooks, so we need 
> to
>  > > abort if multiple hooks are tried.
>  > 
>  > I think we should have global in vfs_unixid.c which remembers that we
>  > already set the hook and not reset it on each tree connect.
> 
> The point of that paranoia check was not for the existing vfs code, it
> was for future uses of that API. The API is now a public part of
> tevent, and may be used by other libraries or modules. The first time
> we used a library like that we would have had silent corruption. 
> 
> It would be perfectly possible to re-do the implementation of this
> function so that it can cope with multiple pieces of code on the same
> event context that need a hook (we could have a linked list of
> hooks). By having this paranoia check we will know when we need to
> re-do the implementation when we first hit this situation.

I think we can keep it simple and let the application add a wrapper
that dispatches multiple hooks.

metze



signature.asc
Description: OpenPGP digital signature


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-605-g1524abd

2009-03-20 Thread Günther Deschner
The branch, master has been updated
   via  1524abd8bf12d82e1fb0063585fc9a465fc7bf9c (commit)
   via  2c186be0df33664eea980c17720be41f25f91288 (commit)
  from  842edcd2b08763a35dbdea3518fcc039aa70aad4 (commit)

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


- Log -
commit 1524abd8bf12d82e1fb0063585fc9a465fc7bf9c
Author: Günther Deschner 
Date:   Thu Mar 19 16:42:54 2009 +0100

s3-krb5: Fix Coverity #722 (RESOURCE_LEAK).

Guenther

commit 2c186be0df33664eea980c17720be41f25f91288
Author: Günther Deschner 
Date:   Thu Mar 19 16:18:29 2009 +0100

s3-net: Fix Coverity #886 (FORWARD_NULL).

Guenther

---

Summary of changes:
 source3/libsmb/clikrb5.c|   30 ++
 source3/utils/net_rpc_printer.c |2 +-
 2 files changed, 19 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 168ca63..4ab3137 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -878,24 +878,30 @@ failed:
 
  bool get_krb5_smb_session_key(krb5_context context, krb5_auth_context 
auth_context, DATA_BLOB *session_key, bool remote)
  {
-   krb5_keyblock *skey;
-   krb5_error_code err;
-   bool ret = False;
+   krb5_keyblock *skey = NULL;
+   krb5_error_code err = 0;
+   bool ret = false;
 
-   if (remote)
+   if (remote) {
err = krb5_auth_con_getremotesubkey(context, auth_context, 
&skey);
-   else
+   } else {
err = krb5_auth_con_getlocalsubkey(context, auth_context, 
&skey);
-   if (err == 0 && skey != NULL) {
-   DEBUG(10, ("Got KRB5 session key of length %d\n",  
(int)KRB5_KEY_LENGTH(skey)));
-   *session_key = data_blob(KRB5_KEY_DATA(skey), 
KRB5_KEY_LENGTH(skey));
-   dump_data_pw("KRB5 Session Key:\n", session_key->data, 
session_key->length);
+   }
 
-   ret = True;
+   if (err || skey == NULL) {
+   DEBUG(10, ("KRB5 error getting session key %d\n", err));
+   goto done;
+   }
 
+   DEBUG(10, ("Got KRB5 session key of length %d\n",  
(int)KRB5_KEY_LENGTH(skey)));
+   *session_key = data_blob(KRB5_KEY_DATA(skey), KRB5_KEY_LENGTH(skey));
+   dump_data_pw("KRB5 Session Key:\n", session_key->data, 
session_key->length);
+
+   ret = true;
+
+ done:
+   if (skey) {
krb5_free_keyblock(context, skey);
-   } else {
-   DEBUG(10, ("KRB5 error getting session key %d\n", err));
}
 
return ret;
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index b25c897..81dfbaa 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -1902,7 +1902,7 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct 
net_context *c,
 
}
 
-   if (strlen(drivername) == 0) {
+   if (!drivername || strlen(drivername) == 0) {
DEBUGADD(1,("Did not get driver for printer %s\n",
printername));
goto done;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-606-g045151b

2009-03-20 Thread Günther Deschner
The branch, master has been updated
   via  045151b767c62ac1343e86cb3886107226e73fda (commit)
  from  1524abd8bf12d82e1fb0063585fc9a465fc7bf9c (commit)

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


- Log -
commit 045151b767c62ac1343e86cb3886107226e73fda
Author: Günther Deschner 
Date:   Thu Mar 19 12:53:01 2009 +0100

s3-spoolss: pure comsetics.

sorry, I just need to do that.

Guenther

---

Summary of changes:
 source3/include/proto.h |5 +-
 source3/rpc_server/srv_spoolss_nt.c |  259 +--
 source3/rpcclient/cmd_spoolss.c |   32 ++--
 source3/utils/net_rpc_printer.c |   82 ++--
 4 files changed, 188 insertions(+), 190 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index d815448..9bffa4d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5931,8 +5931,9 @@ void reset_all_printerdata(struct messaging_context *msg,
 bool convert_devicemode(const char *printername,
const struct spoolss_DeviceMode *devmode,
NT_DEVICEMODE **pp_nt_devmode);
-WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, 
const char *value,
-  uint32 type, uint8 *data, int real_len  );
+WERROR set_printer_dataex(NT_PRINTER_INFO_LEVEL *printer,
+ const char *key, const char *value,
+ uint32_t type, uint8_t *data, int real_len);
 void spoolss_notify_server_name(int snum,
   struct spoolss_Notify *data,
   print_queue_struct *queue,
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index ab15e5c..b66f48a 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -66,13 +66,13 @@ typedef struct _counter_printer_0 {
struct _counter_printer_0 *prev;
 
int snum;
-   uint32 counter;
+   uint32_t counter;
 } counter_printer_0;
 
 static counter_printer_0 *counter_list;
 
 static struct rpc_pipe_client *notify_cli_pipe; /* print notify back-channel 
pipe handle*/
-static uint32 smb_connections=0;
+static uint32_t smb_connections = 0;
 
 
 /* in printing/nt_printing.c */
@@ -186,7 +186,7 @@ static void srv_spoolss_replycloseprinter(int snum, struct 
policy_handle *handle
/* Tell the connections db we're no longer interested in
 * printer notify messages. */
 
-   register_message_flags( False, FLAG_MSG_PRINT_NOTIFY );
+   register_message_flags(false, FLAG_MSG_PRINT_NOTIFY);
}
 
smb_connections--;
@@ -198,7 +198,7 @@ static void srv_spoolss_replycloseprinter(int snum, struct 
policy_handle *handle
 
 static int printer_entry_destructor(Printer_entry *Printer)
 {
-   if (Printer->notify.client_connected==True) {
+   if (Printer->notify.client_connected == true) {
int snum = -1;
 
if ( Printer->printer_type == SPLHND_SERVER) {
@@ -217,7 +217,7 @@ static int printer_entry_destructor(Printer_entry *Printer)
Printer->notify.localmachine[0]='\0';
Printer->notify.printerlocal=0;
TALLOC_FREE(Printer->notify.option);
-   Printer->notify.client_connected=False;
+   Printer->notify.client_connected = false;
 
free_nt_devicemode( &Printer->nt_devmode );
free_a_printer( &Printer->printer_info, 2 );
@@ -255,12 +255,12 @@ static bool close_printer_handle(pipes_struct *p, struct 
policy_handle *hnd)
if (!Printer) {
DEBUG(2,("close_printer_handle: Invalid handle (%s:%u:%u)\n",
OUR_HANDLE(hnd)));
-   return False;
+   return false;
}
 
close_policy_hnd(p, hnd);
 
-   return True;
+   return true;
 }
 
 /
@@ -273,7 +273,7 @@ WERROR delete_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN 
*token, const char *sh
char *command = NULL;
int ret;
SE_PRIV se_printop = SE_PRINT_OPERATOR;
-   bool is_print_op = False;
+   bool is_print_op = false;
 
/* can't fail if we don't try */
 
@@ -315,7 +315,7 @@ WERROR delete_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN 
*token, const char *sh
return WERR_BADFID; /* What to return here? */
 
/* go ahead and re-read the services immediately */
-   reload_services( False );
+   reload_services(false);
 
if ( lp_servicenumber( sharename )  < 0 )
return WERR_ACCESS_DENIED;
@@ -373,7 +373,7 @@ static bool get_printer_snum(pipes_struct *p, struct 
policy_handle *hnd,
if (!Printer) {
   

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-543-g59811de

2009-03-20 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  59811de7a80d5ecdf090c116087c7a03ae27 (commit)
   via  42a692da477d7986767ad90a15087aa8a2ebcb40 (commit)
   via  990917cbe3f8cd00e2d13dd67ee752fffae94401 (commit)
   via  98dd60a0e85d37945deaa997d87f5cb173eaaea9 (commit)
  from  b20cace3a7c312f44f39390954bc087b888d9b27 (commit)

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


- Log -
commit 59811de7a80d5ecdf090c116087c7a03ae27
Author: Günther Deschner 
Date:   Thu Mar 19 12:53:01 2009 +0100

s3-spoolss: pure comsetics.

sorry, I just need to do that.

Guenther
(cherry picked from commit 045151b767c62ac1343e86cb3886107226e73fda)

commit 42a692da477d7986767ad90a15087aa8a2ebcb40
Author: Günther Deschner 
Date:   Thu Mar 19 16:42:54 2009 +0100

s3-krb5: Fix Coverity #722 (RESOURCE_LEAK).

Guenther
(cherry picked from commit 1524abd8bf12d82e1fb0063585fc9a465fc7bf9c)

commit 990917cbe3f8cd00e2d13dd67ee752fffae94401
Author: Günther Deschner 
Date:   Thu Mar 19 16:18:29 2009 +0100

s3-net: Fix Coverity #886 (FORWARD_NULL).

Guenther
(cherry picked from commit 2c186be0df33664eea980c17720be41f25f91288)

commit 98dd60a0e85d37945deaa997d87f5cb173eaaea9
Author: Günther Deschner 
Date:   Thu Nov 27 17:49:25 2008 +0100

s3-samr: try to to fix password_expired flag handling.

Guenther
(cherry picked from commit 842edcd2b08763a35dbdea3518fcc039aa70aad4)

---

Summary of changes:
 source3/include/proto.h |   11 ++-
 source3/libsmb/clikrb5.c|   30 +++--
 source3/rpc_server/srv_samr_nt.c|  120 ++---
 source3/rpc_server/srv_samr_util.c  |   87 +++-
 source3/rpc_server/srv_spoolss_nt.c |  259 +--
 source3/rpcclient/cmd_spoolss.c |   32 ++--
 source3/utils/net_rpc_printer.c |   84 ++--
 7 files changed, 368 insertions(+), 255 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3d87f75..9bffa4d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5898,6 +5898,8 @@ NTSTATUS np_read_recv(struct tevent_req *req, ssize_t 
*nread,
 
 /* The following definitions come from rpc_server/srv_samr_util.c  */
 
+void copy_id18_to_sam_passwd(struct samu *to,
+struct samr_UserInfo18 *from);
 void copy_id20_to_sam_passwd(struct samu *to,
 struct samr_UserInfo20 *from);
 void copy_id21_to_sam_passwd(const char *log_prefix,
@@ -5905,8 +5907,12 @@ void copy_id21_to_sam_passwd(const char *log_prefix,
 struct samr_UserInfo21 *from);
 void copy_id23_to_sam_passwd(struct samu *to,
 struct samr_UserInfo23 *from);
+void copy_id24_to_sam_passwd(struct samu *to,
+struct samr_UserInfo24 *from);
 void copy_id25_to_sam_passwd(struct samu *to,
 struct samr_UserInfo25 *from);
+void copy_id26_to_sam_passwd(struct samu *to,
+struct samr_UserInfo26 *from);
 
 /* The following definitions come from rpc_server/srv_spoolss_nt.c  */
 
@@ -5925,8 +5931,9 @@ void reset_all_printerdata(struct messaging_context *msg,
 bool convert_devicemode(const char *printername,
const struct spoolss_DeviceMode *devmode,
NT_DEVICEMODE **pp_nt_devmode);
-WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, 
const char *value,
-  uint32 type, uint8 *data, int real_len  );
+WERROR set_printer_dataex(NT_PRINTER_INFO_LEVEL *printer,
+ const char *key, const char *value,
+ uint32_t type, uint8_t *data, int real_len);
 void spoolss_notify_server_name(int snum,
   struct spoolss_Notify *data,
   print_queue_struct *queue,
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 168ca63..4ab3137 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -878,24 +878,30 @@ failed:
 
  bool get_krb5_smb_session_key(krb5_context context, krb5_auth_context 
auth_context, DATA_BLOB *session_key, bool remote)
  {
-   krb5_keyblock *skey;
-   krb5_error_code err;
-   bool ret = False;
+   krb5_keyblock *skey = NULL;
+   krb5_error_code err = 0;
+   bool ret = false;
 
-   if (remote)
+   if (remote) {
err = krb5_auth_con_getremotesubkey(context, auth_context, 
&skey);
-   else
+   } else {
err = krb5_auth_con_getlocalsubkey(context, auth_context, 
&skey);
-   if (err == 0 && skey != NULL) {
-   DEBUG(10, ("Got KRB5 session key of length %d\n",  
(int)KRB5_KEY

[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5149-g3517388

2009-03-20 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  3517388b5d5439ffe3f9629aaf826fa1dfbb4ba7 (commit)
  from  f846e0fcdf62333b44a16e5a392930189b512f9b (commit)

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


- Log -
commit 3517388b5d5439ffe3f9629aaf826fa1dfbb4ba7
Author: Günther Deschner 
Date:   Thu Mar 19 16:42:54 2009 +0100

s3-krb5: Fix Coverity #722 (RESOURCE_LEAK).

Guenther
(cherry picked from commit 1524abd8bf12d82e1fb0063585fc9a465fc7bf9c)

---

Summary of changes:
 source/libsmb/clikrb5.c |   30 ++
 1 files changed, 18 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clikrb5.c b/source/libsmb/clikrb5.c
index 3851dce..1e2fe01 100644
--- a/source/libsmb/clikrb5.c
+++ b/source/libsmb/clikrb5.c
@@ -868,24 +868,30 @@ failed:
 
  bool get_krb5_smb_session_key(krb5_context context, krb5_auth_context 
auth_context, DATA_BLOB *session_key, bool remote)
  {
-   krb5_keyblock *skey;
-   krb5_error_code err;
-   bool ret = False;
+   krb5_keyblock *skey = NULL;
+   krb5_error_code err = 0;
+   bool ret = false;
 
-   if (remote)
+   if (remote) {
err = krb5_auth_con_getremotesubkey(context, auth_context, 
&skey);
-   else
+   } else {
err = krb5_auth_con_getlocalsubkey(context, auth_context, 
&skey);
-   if (err == 0 && skey != NULL) {
-   DEBUG(10, ("Got KRB5 session key of length %d\n",  
(int)KRB5_KEY_LENGTH(skey)));
-   *session_key = data_blob(KRB5_KEY_DATA(skey), 
KRB5_KEY_LENGTH(skey));
-   dump_data_pw("KRB5 Session Key:\n", session_key->data, 
session_key->length);
+   }
 
-   ret = True;
+   if (err || skey == NULL) {
+   DEBUG(10, ("KRB5 error getting session key %d\n", err));
+   goto done;
+   }
 
+   DEBUG(10, ("Got KRB5 session key of length %d\n",  
(int)KRB5_KEY_LENGTH(skey)));
+   *session_key = data_blob(KRB5_KEY_DATA(skey), KRB5_KEY_LENGTH(skey));
+   dump_data_pw("KRB5 Session Key:\n", session_key->data, 
session_key->length);
+
+   ret = true;
+
+ done:
+   if (skey) {
krb5_free_keyblock(context, skey);
-   } else {
-   DEBUG(10, ("KRB5 error getting session key %d\n", err));
}
 
return ret;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3513-g5ce5a9b

2009-03-20 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  5ce5a9bea994d7db3d352d0800333d0fd0b833df (commit)
  from  6c13360e195189f7afc70c5fda6ef27f46145b0b (commit)

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


- Log -
commit 5ce5a9bea994d7db3d352d0800333d0fd0b833df
Author: Günther Deschner 
Date:   Thu Mar 19 16:42:54 2009 +0100

s3-krb5: Fix Coverity #722 (RESOURCE_LEAK).

Guenther
(cherry picked from commit 1524abd8bf12d82e1fb0063585fc9a465fc7bf9c)
(cherry picked from commit 3517388b5d5439ffe3f9629aaf826fa1dfbb4ba7)

---

Summary of changes:
 source/libsmb/clikrb5.c |   30 ++
 1 files changed, 18 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clikrb5.c b/source/libsmb/clikrb5.c
index 9fd4914..007fd8d 100644
--- a/source/libsmb/clikrb5.c
+++ b/source/libsmb/clikrb5.c
@@ -861,24 +861,30 @@ failed:
 
  bool get_krb5_smb_session_key(krb5_context context, krb5_auth_context 
auth_context, DATA_BLOB *session_key, bool remote)
  {
-   krb5_keyblock *skey;
-   krb5_error_code err;
-   bool ret = False;
+   krb5_keyblock *skey = NULL;
+   krb5_error_code err = 0;
+   bool ret = false;
 
-   if (remote)
+   if (remote) {
err = krb5_auth_con_getremotesubkey(context, auth_context, 
&skey);
-   else
+   } else {
err = krb5_auth_con_getlocalsubkey(context, auth_context, 
&skey);
-   if (err == 0 && skey != NULL) {
-   DEBUG(10, ("Got KRB5 session key of length %d\n",  
(int)KRB5_KEY_LENGTH(skey)));
-   *session_key = data_blob(KRB5_KEY_DATA(skey), 
KRB5_KEY_LENGTH(skey));
-   dump_data_pw("KRB5 Session Key:\n", session_key->data, 
session_key->length);
+   }
 
-   ret = True;
+   if (err || skey == NULL) {
+   DEBUG(10, ("KRB5 error getting session key %d\n", err));
+   goto done;
+   }
 
+   DEBUG(10, ("Got KRB5 session key of length %d\n",  
(int)KRB5_KEY_LENGTH(skey)));
+   *session_key = data_blob(KRB5_KEY_DATA(skey), KRB5_KEY_LENGTH(skey));
+   dump_data_pw("KRB5 Session Key:\n", session_key->data, 
session_key->length);
+
+   ret = true;
+
+ done:
+   if (skey) {
krb5_free_keyblock(context, skey);
-   } else {
-   DEBUG(10, ("KRB5 error getting session key %d\n", err));
}
 
return ret;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-612-g3a6133d

2009-03-20 Thread Günther Deschner
The branch, master has been updated
   via  3a6133d70202ef80ead4203740c000be5e93b288 (commit)
   via  f2243e8197aa064adea3da2a4d1c08250668943f (commit)
   via  d2e348b191ada5492538b7bdae1bb7cd3f639aba (commit)
   via  97190ae184dff6450b1390c854f7426e2ee3f980 (commit)
   via  73030b107d5722a2c42cd18240d45bcb256335ac (commit)
   via  d2fb6d348248cdca7e55360c77aa31b91250f885 (commit)
  from  045151b767c62ac1343e86cb3886107226e73fda (commit)

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


- Log -
commit 3a6133d70202ef80ead4203740c000be5e93b288
Author: Günther Deschner 
Date:   Fri Mar 20 11:21:36 2009 +0100

s3-netapi: Fix Coverity #774 (REVERSE_INULL).

Guenther

commit f2243e8197aa064adea3da2a4d1c08250668943f
Author: Günther Deschner 
Date:   Fri Mar 20 11:19:59 2009 +0100

s3-netapi: Fix Coverity #775 (REVERSE_INULL).

Guenther

commit d2e348b191ada5492538b7bdae1bb7cd3f639aba
Author: Günther Deschner 
Date:   Fri Mar 20 11:17:50 2009 +0100

s3-netapi: Fix Coverity #776 (REVERSE_INULL).

Guenther

commit 97190ae184dff6450b1390c854f7426e2ee3f980
Author: Günther Deschner 
Date:   Fri Mar 20 11:11:04 2009 +0100

s3-krb5: Fix Coverity #762 (REVERSE_INULL).

Guenther

commit 73030b107d5722a2c42cd18240d45bcb256335ac
Author: Günther Deschner 
Date:   Fri Mar 20 11:07:21 2009 +0100

s3-net: Fix Coverity #861 (UNINIT).

Guenther

commit d2fb6d348248cdca7e55360c77aa31b91250f885
Author: Günther Deschner 
Date:   Fri Mar 20 11:04:59 2009 +0100

s3-net: Fix Coverity #898 (UNINIT).

Guenther

---

Summary of changes:
 source3/lib/netapi/group.c |   10 +++---
 source3/lib/netapi/user.c  |   18 ++
 source3/libads/kerberos.c  |   12 ++--
 source3/utils/net_rpc.c|4 ++--
 4 files changed, 17 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c
index 189902a..c09632a 100644
--- a/source3/lib/netapi/group.c
+++ b/source3/lib/netapi/group.c
@@ -1276,6 +1276,7 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
 
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+   *r->out.total_entries = 0;
 
switch (r->in.level) {
case 0:
@@ -1364,13 +1365,8 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
}
}
 
-   if (r->out.entries_read) {
-   *r->out.entries_read = entries_read;
-   }
-
-   if (r->out.total_entries) {
-   *r->out.total_entries = entries_read;
-   }
+   *r->out.entries_read = entries_read;
+   *r->out.total_entries = entries_read;
 
werr = WERR_OK;
 
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 8cc65a6..e760a8b 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -2806,6 +2806,7 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
 
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+   *r->out.total_entries = 0;
 
switch (r->in.level) {
case 0:
@@ -2899,12 +2900,8 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
}
}
 
-   if (r->out.entries_read) {
-   *r->out.entries_read = entries_read;
-   }
-   if (r->out.total_entries) {
-   *r->out.total_entries = entries_read;
-   }
+   *r->out.entries_read = entries_read;
+   *r->out.total_entries = entries_read;
 
  done:
if (ctx->disable_policy_handle_cache) {
@@ -3242,6 +3239,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
 
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+   *r->out.total_entries = 0;
 
switch (r->in.level) {
case 0:
@@ -3402,12 +3400,8 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
}
}
 
-   if (r->out.entries_read) {
-   *r->out.entries_read = entries_read;
-   }
-   if (r->out.total_entries) {
-   *r->out.total_entries = entries_read;
-   }
+   *r->out.entries_read = entries_read;
+   *r->out.total_entries = entries_read;
 
  done:
if (ctx->disable_policy_handle_cache) {
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 56d7b06..52cb975 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -511,13 +511,13 @@ char *kerberos_get_default_realm_from_ccache( void )
 
   out:
 
-   if (princ) {
-   krb5_free_principal(ctx, princ);
-   }
-   if (cc) {
-   krb5_cc_close(ctx, cc);
-   }
if (ctx) {
+   if (princ) {
+   krb5_free_principal(ctx, princ);
+   }
+   if (cc) {
+   krb5_cc

[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5153-g9bf3e12

2009-03-20 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  9bf3e129605d51483fd5ce47c90642f7e82ac102 (commit)
   via  3b0f612c52e992cd130f5176432722bada3c64e4 (commit)
   via  76c858c6fcb8111e3fd87a2a8aa2606ab06bb90a (commit)
   via  0f7757e94bfa35d22a7349d78578685c0dba22d7 (commit)
  from  3517388b5d5439ffe3f9629aaf826fa1dfbb4ba7 (commit)

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


- Log -
commit 9bf3e129605d51483fd5ce47c90642f7e82ac102
Author: Günther Deschner 
Date:   Fri Mar 20 11:36:00 2009 +0100

s3-netapi: Fix Coverity #774 (REVERSE_INULL).

Guenther

commit 3b0f612c52e992cd130f5176432722bada3c64e4
Author: Günther Deschner 
Date:   Fri Mar 20 11:34:43 2009 +0100

s3-netapi: Fix Coverity #775 (REVERSE_INULL).

Guenther

commit 76c858c6fcb8111e3fd87a2a8aa2606ab06bb90a
Author: Günther Deschner 
Date:   Fri Mar 20 11:17:50 2009 +0100

s3-netapi: Fix Coverity #776 (REVERSE_INULL).

Guenther
(cherry picked from commit d2e348b191ada5492538b7bdae1bb7cd3f639aba)

commit 0f7757e94bfa35d22a7349d78578685c0dba22d7
Author: Günther Deschner 
Date:   Fri Mar 20 11:11:04 2009 +0100

s3-krb5: Fix Coverity #762 (REVERSE_INULL).

Guenther
(cherry picked from commit 97190ae184dff6450b1390c854f7426e2ee3f980)

---

Summary of changes:
 source/lib/netapi/group.c |   10 +++---
 source/lib/netapi/user.c  |   18 ++
 source/libads/kerberos.c  |   12 ++--
 3 files changed, 15 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/netapi/group.c b/source/lib/netapi/group.c
index a78c784..b3bb14e 100644
--- a/source/lib/netapi/group.c
+++ b/source/lib/netapi/group.c
@@ -1319,6 +1319,7 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
 
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+   *r->out.total_entries = 0;
 
switch (r->in.level) {
case 0:
@@ -1408,13 +1409,8 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
}
}
 
-   if (r->out.entries_read) {
-   *r->out.entries_read = entries_read;
-   }
-
-   if (r->out.total_entries) {
-   *r->out.total_entries = entries_read;
-   }
+   *r->out.entries_read = entries_read;
+   *r->out.total_entries = entries_read;
 
werr = WERR_OK;
 
diff --git a/source/lib/netapi/user.c b/source/lib/netapi/user.c
index 1f4b03f..84d32dc 100644
--- a/source/lib/netapi/user.c
+++ b/source/lib/netapi/user.c
@@ -2849,6 +2849,7 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
 
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+   *r->out.total_entries = 0;
 
switch (r->in.level) {
case 0:
@@ -2943,12 +2944,8 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
}
}
 
-   if (r->out.entries_read) {
-   *r->out.entries_read = entries_read;
-   }
-   if (r->out.total_entries) {
-   *r->out.total_entries = entries_read;
-   }
+   *r->out.entries_read = entries_read;
+   *r->out.total_entries = entries_read;
 
  done:
if (!cli) {
@@ -3297,6 +3294,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
 
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+   *r->out.total_entries = 0;
 
switch (r->in.level) {
case 0:
@@ -3458,12 +3456,8 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
}
}
 
-   if (r->out.entries_read) {
-   *r->out.entries_read = entries_read;
-   }
-   if (r->out.total_entries) {
-   *r->out.total_entries = entries_read;
-   }
+   *r->out.entries_read = entries_read;
+   *r->out.total_entries = entries_read;
 
  done:
if (!cli) {
diff --git a/source/libads/kerberos.c b/source/libads/kerberos.c
index 56c3af8..973647e 100644
--- a/source/libads/kerberos.c
+++ b/source/libads/kerberos.c
@@ -541,13 +541,13 @@ char *kerberos_get_default_realm_from_ccache( void )
 
   out:
 
-   if (princ) {
-   krb5_free_principal(ctx, princ);
-   }
-   if (cc) {
-   krb5_cc_close(ctx, cc);
-   }
if (ctx) {
+   if (princ) {
+   krb5_free_principal(ctx, princ);
+   }
+   if (cc) {
+   krb5_cc_close(ctx, cc);
+   }
krb5_free_context(ctx);
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3514-g66faa80

2009-03-20 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  66faa809847ad60b8027ae86068f8d62c0d181ed (commit)
  from  5ce5a9bea994d7db3d352d0800333d0fd0b833df (commit)

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


- Log -
commit 66faa809847ad60b8027ae86068f8d62c0d181ed
Author: Günther Deschner 
Date:   Fri Mar 20 11:11:04 2009 +0100

s3-krb5: Fix Coverity #762 (REVERSE_INULL).

Guenther
(cherry picked from commit 97190ae184dff6450b1390c854f7426e2ee3f980)
(cherry picked from commit 0f7757e94bfa35d22a7349d78578685c0dba22d7)

---

Summary of changes:
 source/libads/kerberos.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libads/kerberos.c b/source/libads/kerberos.c
index 275eb53..76f6d79 100644
--- a/source/libads/kerberos.c
+++ b/source/libads/kerberos.c
@@ -535,13 +535,13 @@ char *kerberos_get_default_realm_from_ccache( void )
 
   out:
 
-   if (princ) {
-   krb5_free_principal(ctx, princ);
-   }
-   if (cc) {
-   krb5_cc_close(ctx, cc);
-   }
if (ctx) {
+   if (princ) {
+   krb5_free_principal(ctx, princ);
+   }
+   if (cc) {
+   krb5_cc_close(ctx, cc);
+   }
krb5_free_context(ctx);
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-549-g0ec1350

2009-03-20 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  0ec1350d3d9272a6070950ba1d460523f53a628d (commit)
   via  8a6f09cededf4167aea5f08e573bab51afcc0074 (commit)
   via  e858d192e1d7d6ab45ec247fbb776f5825e7fca5 (commit)
   via  1a591aadb66d589171d236fc2f8bf2eb6d9ce499 (commit)
   via  81a6aee736f805d1bf8d7d2a1ff19851cd11d763 (commit)
   via  874caf9a1fb45f36ec8c506d29264735d1647dae (commit)
  from  59811de7a80d5ecdf090c116087c7a03ae27 (commit)

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


- Log -
commit 0ec1350d3d9272a6070950ba1d460523f53a628d
Author: Günther Deschner 
Date:   Fri Mar 20 11:21:36 2009 +0100

s3-netapi: Fix Coverity #774 (REVERSE_INULL).

Guenther
(cherry picked from commit 3a6133d70202ef80ead4203740c000be5e93b288)

commit 8a6f09cededf4167aea5f08e573bab51afcc0074
Author: Günther Deschner 
Date:   Fri Mar 20 11:19:59 2009 +0100

s3-netapi: Fix Coverity #775 (REVERSE_INULL).

Guenther
(cherry picked from commit f2243e8197aa064adea3da2a4d1c08250668943f)

commit e858d192e1d7d6ab45ec247fbb776f5825e7fca5
Author: Günther Deschner 
Date:   Fri Mar 20 11:17:50 2009 +0100

s3-netapi: Fix Coverity #776 (REVERSE_INULL).

Guenther
(cherry picked from commit d2e348b191ada5492538b7bdae1bb7cd3f639aba)

commit 1a591aadb66d589171d236fc2f8bf2eb6d9ce499
Author: Günther Deschner 
Date:   Fri Mar 20 11:11:04 2009 +0100

s3-krb5: Fix Coverity #762 (REVERSE_INULL).

Guenther
(cherry picked from commit 97190ae184dff6450b1390c854f7426e2ee3f980)

commit 81a6aee736f805d1bf8d7d2a1ff19851cd11d763
Author: Günther Deschner 
Date:   Fri Mar 20 11:07:21 2009 +0100

s3-net: Fix Coverity #861 (UNINIT).

Guenther
(cherry picked from commit 73030b107d5722a2c42cd18240d45bcb256335ac)

commit 874caf9a1fb45f36ec8c506d29264735d1647dae
Author: Günther Deschner 
Date:   Fri Mar 20 11:04:59 2009 +0100

s3-net: Fix Coverity #898 (UNINIT).

Guenther
(cherry picked from commit d2fb6d348248cdca7e55360c77aa31b91250f885)

---

Summary of changes:
 source3/lib/netapi/group.c |   10 +++---
 source3/lib/netapi/user.c  |   18 ++
 source3/libads/kerberos.c  |   12 ++--
 source3/utils/net_rpc.c|4 ++--
 4 files changed, 17 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c
index 189902a..c09632a 100644
--- a/source3/lib/netapi/group.c
+++ b/source3/lib/netapi/group.c
@@ -1276,6 +1276,7 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
 
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+   *r->out.total_entries = 0;
 
switch (r->in.level) {
case 0:
@@ -1364,13 +1365,8 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
}
}
 
-   if (r->out.entries_read) {
-   *r->out.entries_read = entries_read;
-   }
-
-   if (r->out.total_entries) {
-   *r->out.total_entries = entries_read;
-   }
+   *r->out.entries_read = entries_read;
+   *r->out.total_entries = entries_read;
 
werr = WERR_OK;
 
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 8cc65a6..e760a8b 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -2806,6 +2806,7 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
 
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+   *r->out.total_entries = 0;
 
switch (r->in.level) {
case 0:
@@ -2899,12 +2900,8 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
}
}
 
-   if (r->out.entries_read) {
-   *r->out.entries_read = entries_read;
-   }
-   if (r->out.total_entries) {
-   *r->out.total_entries = entries_read;
-   }
+   *r->out.entries_read = entries_read;
+   *r->out.total_entries = entries_read;
 
  done:
if (ctx->disable_policy_handle_cache) {
@@ -3242,6 +3239,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
 
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+   *r->out.total_entries = 0;
 
switch (r->in.level) {
case 0:
@@ -3402,12 +3400,8 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
}
}
 
-   if (r->out.entries_read) {
-   *r->out.entries_read = entries_read;
-   }
-   if (r->out.total_entries) {
-   *r->out.total_entries = entries_read;
-   }
+   *r->out.entries_read = entries_read;
+   *r->out.total_entries = entries_read;
 
  done:
if (ctx->disable_policy_handle_cache) {
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 56d7b06..52cb975 100644
--- a/source3/libads/kerberos.c
+++

Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-557-gd380c49

2009-03-20 Thread tridge
Hi Metze,

 > tevent_loop_wait() calls tevent_loop_once() internally,
 > see the tevent_common_loop_once() function.

I missed that, though it only seems to be true for the main
backends. The liboop backend doesn't call tevent_common_loop_once.

We're tying ourselves in a pretty set of knots here :-)

Cheers, Tridge


Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-557-gd380c49

2009-03-20 Thread Stefan (metze) Metzmacher
tri...@samba.org schrieb:
> Hi Metze,
> 
>  > tevent_loop_wait() calls tevent_loop_once() internally,
>  > see the tevent_common_loop_once() function.
> 
> I missed that, though it only seems to be true for the main
> backends. The liboop backend doesn't call tevent_common_loop_once.

Backends which implement their own _loop_wait function currently need to
increment the level on their own. Maybe we should let
tevent_commom_loop_once() call ev->ops->loop_once() instead of
_tevent_loop_once() and then increment the level in tevent_loop_wait()
to make it more consistent for other backends.

The whole liboop backend needs updates, or just remove it...

metze




signature.asc
Description: OpenPGP digital signature


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-613-g1ef2065

2009-03-20 Thread Stefan Metzmacher
The branch, master has been updated
   via  1ef206524de589efeeef0544afbf7bfb37d99c15 (commit)
  from  3a6133d70202ef80ead4203740c000be5e93b288 (commit)

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


- Log -
commit 1ef206524de589efeeef0544afbf7bfb37d99c15
Author: Stefan Metzmacher 
Date:   Fri Mar 20 14:25:15 2009 +0100

selftest/Samba3: use the same sequence of signals to shutdown samba3 as 
with the shell scripts

When we kill the timelimit process with SIGKILL, it can't kill its
children...

metze

---

Summary of changes:
 selftest/target/Samba3.pm |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index e1bea16..2b96226 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -41,6 +41,9 @@ sub teardown_env($$)
$self->stop_sig_term($smbdpid);
$self->stop_sig_term($nmbdpid);
$self->stop_sig_term($winbinddpid);
+
+   sleep(2);
+
$self->stop_sig_kill($smbdpid);
$self->stop_sig_kill($nmbdpid);
$self->stop_sig_kill($winbinddpid);
@@ -187,7 +190,7 @@ sub stop_sig_term($$) {
 
 sub stop_sig_kill($$) {
my ($self, $pid) = @_;
-   kill("KILL", $pid) or warn("Unable to kill $pid: $!");
+   kill("ALRM", $pid) or warn("Unable to kill $pid: $!");
 }
 
 sub write_pid($$$)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-614-g2de464a

2009-03-20 Thread Jelmer Vernooij
The branch, master has been updated
   via  2de464a7658f91d2d01087080b984d52c3483426 (commit)
  from  1ef206524de589efeeef0544afbf7bfb37d99c15 (commit)

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


- Log -
commit 2de464a7658f91d2d01087080b984d52c3483426
Author: Matthias Dieter Wallnoefer 
Date:   Fri Mar 20 16:22:02 2009 +0100

Fix uninstallman.

Signed-off-by: Jelmer Vernooij 

---

Summary of changes:
 source4/script/uninstallman.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/script/uninstallman.sh b/source4/script/uninstallman.sh
index 9b087c6..edc1c47 100755
--- a/source4/script/uninstallman.sh
+++ b/source4/script/uninstallman.sh
@@ -8,7 +8,7 @@ MANPAGES=$*
 
 for I in $MANPAGES
 do
-   SECTION=`echo -n $I | sed "s/.*\(.\)$/\1/"
+   SECTION=`echo -n $I | sed "s/.*\(.\)$/\1/"`
FNAME=$MANDIR/man$SECTION/$I
if test -f $FNAME; then
  echo Deleting $FNAME


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-621-g19de802

2009-03-20 Thread Günther Deschner
The branch, master has been updated
   via  19de802c171f70ec4de102452afac52e2c0e548f (commit)
   via  d2de9b068c19a8eaac64f9cf4ea4aae153cffcd4 (commit)
   via  aa6dbcfc11b74c1e80728bc295d9612ba4eb1e64 (commit)
   via  6713244d465b0cf69f1bba15744e05795ec2fda9 (commit)
   via  95f2913c7de2ac69421911ec2cb0fcbb8c4e8e93 (commit)
   via  5a388115a944a425a774d7ec98260b7595998ee1 (commit)
   via  c9a388348a2d4b276448b6a7bfc8c575b99f8eb7 (commit)
  from  2de464a7658f91d2d01087080b984d52c3483426 (commit)

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


- Log -
commit 19de802c171f70ec4de102452afac52e2c0e548f
Author: Günther Deschner 
Date:   Fri Mar 20 16:03:54 2009 +0100

s3-spoolss: _spoolss_EnumPrinters level 3 always returns WERR_UNKNOWN_LEVEL.

Guenther

commit d2de9b068c19a8eaac64f9cf4ea4aae153cffcd4
Author: Günther Deschner 
Date:   Fri Mar 20 15:53:17 2009 +0100

s3-spoolss: implement enumprinters_level4.

Guenther

commit aa6dbcfc11b74c1e80728bc295d9612ba4eb1e64
Author: Günther Deschner 
Date:   Fri Mar 20 15:49:57 2009 +0100

s3-spoolss: implement enumprinters_level5.

Guenther

commit 6713244d465b0cf69f1bba15744e05795ec2fda9
Author: Günther Deschner 
Date:   Fri Mar 20 15:48:10 2009 +0100

s3-spoolss: use enum_all_printers_info_level for level 1 and 2.

Guenther

commit 95f2913c7de2ac69421911ec2cb0fcbb8c4e8e93
Author: Günther Deschner 
Date:   Fri Mar 20 15:44:31 2009 +0100

s3-spoolss: add enum_all_printers_info_level().

Guenther

commit 5a388115a944a425a774d7ec98260b7595998ee1
Author: Günther Deschner 
Date:   Fri Mar 20 15:14:09 2009 +0100

s3-spoolss: apply some const in spoolss server.

Guenther

commit c9a388348a2d4b276448b6a7bfc8c575b99f8eb7
Author: Günther Deschner 
Date:   Fri Mar 20 14:47:13 2009 +0100

s3-rpcclient: allow to set flags in enumprinters command.

Guenther

---

Summary of changes:
 source3/include/proto.h |6 +-
 source3/printing/nt_printing.c  |   11 +-
 source3/rpc_server/srv_spoolss_nt.c |  245 ++-
 source3/rpcclient/cmd_spoolss.c |   13 ++-
 4 files changed, 142 insertions(+), 133 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 9bffa4d..dc26f6d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4828,7 +4828,7 @@ WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, 
const char *key, const cha
 REGISTRY_VALUE* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char 
*key, const char *value );
 WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
 bool set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
-bool del_driver_init(char *drivername);
+bool del_driver_init(const char *drivername);
 WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, uint8 
*data, uint32 data_len);
 WERROR get_a_printer( Printer_entry *print_hnd,
NT_PRINTER_INFO_LEVEL **pp_printer,
@@ -4840,8 +4840,8 @@ WERROR get_a_printer_search( Printer_entry *print_hnd,
const char *sharename);
 uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level);
 uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
-WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
-fstring drivername, const char *architecture, 
uint32 version);
+WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32_t 
level,
+   const char *drivername, const char *architecture, 
uint32_t version);
 uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 
level);
 bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 );
 bool printer_driver_files_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info );
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 8e6fe1f..a99485d 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2275,7 +2275,9 @@ static WERROR 
get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **in
 
 /
 /
-static WERROR get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 
**info_ptr, fstring drivername, const char *arch, uint32 version)
+static WERROR get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr,
+const char *drivername, const char *arch,
+uint32_t version)
 {
NT_PRINTER_DRIVER_INFO_LEVEL_3 driver;
TDB_DATA dbuf;
@@ -4448,7 +4450,7 @@ bool set_driver_init(NT_PR

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-556-g8630f2c

2009-03-20 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  8630f2cbdfaaf8260615f16ba360b1281b666df5 (commit)
   via  53965d391c08cc3b935f5bd86d2d95bb6fe89262 (commit)
   via  48df86ca7f6d59b530597621862a619813a0568f (commit)
   via  ebf6d6d956a60c4f95baa4e148573bde933bdb2d (commit)
   via  ce1b736da021858273a1daff0246e0740bc67620 (commit)
   via  e0cdb435d38c643d5a75aa16e793c6f09a349978 (commit)
   via  f9eb007d64e155d561cd257d3d6e09b267299a0b (commit)
  from  0ec1350d3d9272a6070950ba1d460523f53a628d (commit)

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


- Log -
commit 8630f2cbdfaaf8260615f16ba360b1281b666df5
Author: Günther Deschner 
Date:   Fri Mar 20 16:03:54 2009 +0100

s3-spoolss: _spoolss_EnumPrinters level 3 always returns WERR_UNKNOWN_LEVEL.

Guenther
(cherry picked from commit 19de802c171f70ec4de102452afac52e2c0e548f)

commit 53965d391c08cc3b935f5bd86d2d95bb6fe89262
Author: Günther Deschner 
Date:   Fri Mar 20 15:53:17 2009 +0100

s3-spoolss: implement enumprinters_level4.

Guenther
(cherry picked from commit d2de9b068c19a8eaac64f9cf4ea4aae153cffcd4)

commit 48df86ca7f6d59b530597621862a619813a0568f
Author: Günther Deschner 
Date:   Fri Mar 20 15:49:57 2009 +0100

s3-spoolss: implement enumprinters_level5.

Guenther
(cherry picked from commit aa6dbcfc11b74c1e80728bc295d9612ba4eb1e64)

commit ebf6d6d956a60c4f95baa4e148573bde933bdb2d
Author: Günther Deschner 
Date:   Fri Mar 20 15:48:10 2009 +0100

s3-spoolss: use enum_all_printers_info_level for level 1 and 2.

Guenther
(cherry picked from commit 6713244d465b0cf69f1bba15744e05795ec2fda9)

commit ce1b736da021858273a1daff0246e0740bc67620
Author: Günther Deschner 
Date:   Fri Mar 20 15:44:31 2009 +0100

s3-spoolss: add enum_all_printers_info_level().

Guenther
(cherry picked from commit 95f2913c7de2ac69421911ec2cb0fcbb8c4e8e93)

commit e0cdb435d38c643d5a75aa16e793c6f09a349978
Author: Günther Deschner 
Date:   Fri Mar 20 15:14:09 2009 +0100

s3-spoolss: apply some const in spoolss server.

Guenther
(cherry picked from commit 5a388115a944a425a774d7ec98260b7595998ee1)

commit f9eb007d64e155d561cd257d3d6e09b267299a0b
Author: Günther Deschner 
Date:   Fri Mar 20 14:47:13 2009 +0100

s3-rpcclient: allow to set flags in enumprinters command.

Guenther
(cherry picked from commit c9a388348a2d4b276448b6a7bfc8c575b99f8eb7)

---

Summary of changes:
 source3/include/proto.h |6 +-
 source3/printing/nt_printing.c  |   11 +-
 source3/rpc_server/srv_spoolss_nt.c |  245 ++-
 source3/rpcclient/cmd_spoolss.c |   13 ++-
 4 files changed, 142 insertions(+), 133 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 9bffa4d..dc26f6d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4828,7 +4828,7 @@ WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, 
const char *key, const cha
 REGISTRY_VALUE* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char 
*key, const char *value );
 WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
 bool set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
-bool del_driver_init(char *drivername);
+bool del_driver_init(const char *drivername);
 WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, uint8 
*data, uint32 data_len);
 WERROR get_a_printer( Printer_entry *print_hnd,
NT_PRINTER_INFO_LEVEL **pp_printer,
@@ -4840,8 +4840,8 @@ WERROR get_a_printer_search( Printer_entry *print_hnd,
const char *sharename);
 uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level);
 uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
-WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
-fstring drivername, const char *architecture, 
uint32 version);
+WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32_t 
level,
+   const char *drivername, const char *architecture, 
uint32_t version);
 uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 
level);
 bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 );
 bool printer_driver_files_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info );
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 8e6fe1f..a99485d 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2275,7 +2275,9 @@ static WERROR 
get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **in
 
 /
 *

Build status as of Sat Mar 21 00:00:02 2009

2009-03-20 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-03-20 
00:00:31.0 +
+++ /home/build/master/cache/broken_results.txt 2009-03-21 00:00:30.0 
+
@@ -1,4 +1,4 @@
-Build status as of Fri Mar 20 00:00:02 2009
+Build status as of Sat Mar 21 00:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
@@ -6,16 +6,16 @@
 ccache   30 5  0 
 ctdb 0  0  0 
 distcc   0  0  0 
-ldb  30 30 0 
-libreplace   30 11 0 
+ldb  29 30 0 
+libreplace   28 11 0 
 lorikeet-heimdal 27 14 0 
 pidl 21 3  0 
 ppp  13 0  0 
 rsync30 10 0 
 samba-docs   0  0  0 
 samba-gtk5  5  0 
-samba_3_X_devel 28 28 0 
-samba_3_X_test 28 27 1 
+samba_3_X_devel 29 28 0 
+samba_3_X_test 27 25 1 
 samba_4_0_test 30 29 1 
 smb-build29 6  0 
 talloc   30 30 0 


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-626-g960b755

2009-03-20 Thread Jelmer Vernooij
The branch, master has been updated
   via  960b75531530c05fcaaa7400e52f2b688a6e8d88 (commit)
   via  de1e3e2cf0c666a51b062ed5395906892beb53c0 (commit)
   via  8f4e4d2e3039997106f9da3dcd5b057d99802ecf (commit)
   via  4fff36f618420dea2e004f87ae5a2699eabd140a (commit)
   via  ee577ef0eef2d666504d1b78bb102b5c2e070b03 (commit)
  from  19de802c171f70ec4de102452afac52e2c0e548f (commit)

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


- Log -
commit 960b75531530c05fcaaa7400e52f2b688a6e8d88
Author: Jelmer Vernooij 
Date:   Sat Mar 21 02:19:25 2009 +0100

pyldb: Let conversion to LDIF up to the user of the API rather than doing
it implicitly.

commit de1e3e2cf0c666a51b062ed5395906892beb53c0
Author: Jelmer Vernooij 
Date:   Sat Mar 21 01:00:18 2009 +0100

Remove unnecessary duplication of string in memory.

commit 8f4e4d2e3039997106f9da3dcd5b057d99802ecf
Author: Jelmer Vernooij 
Date:   Fri Mar 20 22:58:15 2009 +0100

Adapt Zahari's test to the generic LDB Python tests.

commit 4fff36f618420dea2e004f87ae5a2699eabd140a
Author: zahari 
Date:   Fri Mar 20 12:03:29 2009 +0200

Setting nTSecurityDescriptor via LDAP fails

Fix for the problem was substitute talloc_strndup() with
talloc_memdup(), allocate 1 more character and put null character
('\0') in the extra place so data copied is null terminated.

Signed-off-by: Jelmer Vernooij 

commit ee577ef0eef2d666504d1b78bb102b5c2e070b03
Author: Jelmer Vernooij 
Date:   Fri Mar 20 22:52:57 2009 +0100

Add more comments.

---

Summary of changes:
 source4/lib/ldb/pyldb.c |   63 +++---
 source4/lib/ldb/tests/python/api.py |   13 +++
 2 files changed, 55 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 7ff4bf4..bceda05 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -5,7 +5,7 @@
 
Copyright (C) 2005,2006 Tim Potter 
Copyright (C) 2006 Simo Sorce 
-   Copyright (C) 2007-2008 Jelmer Vernooij 
+   Copyright (C) 2007-2009 Jelmer Vernooij 
 
 ** NOTE! The following LGPL license applies to the ldb
 ** library. This does NOT imply that all of Samba is released
@@ -65,18 +65,7 @@ static PyObject *PyObject_FromLdbValue(struct ldb_context 
*ldb_ctx,
PyObject *ret;

new_val = *val;
-   
-   if (ldb_ctx != NULL) {  
-   a = ldb_schema_attribute_by_name(ldb_ctx, el->name);
-   
-   if (a != NULL) {
-   if (a->syntax->ldif_write_fn(ldb_ctx, mem_ctx, val, 
&new_val) != 0) {
-   talloc_free(mem_ctx);
-   return NULL;
-   }
-   }
-   } 
-   
+
ret = PyString_FromStringAndSize((const char *)new_val.data, 
new_val.length);

talloc_free(mem_ctx);
@@ -84,6 +73,14 @@ static PyObject *PyObject_FromLdbValue(struct ldb_context 
*ldb_ctx,
return ret;
 }
 
+/**
+ * Obtain a ldb DN from a Python object.
+ *
+ * @param mem_ctx Memory context
+ * @param object Python object
+ * @param ldb_ctx LDB context
+ * @return Whether or not the conversion succeeded
+ */
 bool PyObject_AsDn(TALLOC_CTX *mem_ctx, PyObject *object, 
   struct ldb_context *ldb_ctx, struct ldb_dn **dn)
 {
@@ -104,6 +101,12 @@ bool PyObject_AsDn(TALLOC_CTX *mem_ctx, PyObject *object,
return false;
 }
 
+/**
+ * Create a Python object from a ldb_result.
+ *
+ * @param result LDB result to convert
+ * @return Python object with converted result (a list object)
+ */
 static PyObject *PyLdbResult_FromResult(struct ldb_result *result)
 {
PyObject *ret;
@@ -119,7 +122,16 @@ static PyObject *PyLdbResult_FromResult(struct ldb_result 
*result)
return ret;
 }
 
-static struct ldb_result *PyLdbResult_AsResult(TALLOC_CTX *mem_ctx, PyObject 
*obj)
+/**
+ * Create a LDB Result from a Python object. 
+ * If conversion fails, NULL will be returned and a Python exception set.
+ *
+ * @param mem_ctx Memory context in which to allocate the LDB Result
+ * @param obj Python object to convert
+ * @return a ldb_result, or NULL if the conversion failed
+ */
+static struct ldb_result *PyLdbResult_AsResult(TALLOC_CTX *mem_ctx, 
+   
   PyObject *obj)
 {
struct ldb_result *res;
int i;
@@ -451,7 +463,6 @@ static PyObject *py_ldb_get_schema_basedn(PyLdbObject *self)
return PyLdbDn_FromDn(dn);
 }
 
-
 static PyObject *py_ldb_get_config_basedn(PyLdbObject *self)
 {
struct ldb_dn *dn = ldb_get_config_basedn(PyLdb_AsLdbContext(self));
@@ -460,7 +471,6 @@ static PyObject *py_ldb_get_config_basedn(PyLdbObject *self)

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-627-g62ab39d

2009-03-20 Thread Jelmer Vernooij
The branch, master has been updated
   via  62ab39dde37f5570b336b9db5b4e3c2e4640e877 (commit)
  from  960b75531530c05fcaaa7400e52f2b688a6e8d88 (commit)

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


- Log -
commit 62ab39dde37f5570b336b9db5b4e3c2e4640e877
Author: Matthias Dieter Wallnoefer 
Date:   Sat Mar 21 03:07:00 2009 +0100

s4/provision: Use existing serverrole variable.

Signed-off-by: Jelmer Vernooij 

---

Summary of changes:
 source4/scripting/python/samba/provision.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/provision.py 
b/source4/scripting/python/samba/provision.py
index d968576..896f237 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -1056,7 +1056,7 @@ def provision(setup_dir, message, session_info,
 serverrole=serverrole, ldap_backend=ldap_backend, 
 ldap_backend_type=ldap_backend_type)
 
-if lp.get("server role") == "domain controller":
+if serverrole == "domain controller":
 if paths.netlogon is None:
 message("Existing smb.conf does not have a [netlogon] share, but 
you are configuring a DC.")
 message("Please either remove %s or see the template at %s" % 


-- 
Samba Shared Repository