The branch, master has been updated
       via  65710da... pam_winbind: Remove a nested if-statement. Bo, please 
check!
       via  8cb6f7e... pam_winbind: Use strchr instead of strstr for a single 
character
      from  b93f07e... Fix trailing whitespace errors I added (sorry).

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


- Log -----------------------------------------------------------------
commit 65710dae847273edb99495241e6d7b7acd303c5f
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Feb 6 12:56:19 2010 +0100

    pam_winbind: Remove a nested if-statement. Bo, please check!

commit 8cb6f7ec1bdaa086e77fc865c2226151dcd602a7
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Feb 6 12:55:00 2010 +0100

    pam_winbind: Use strchr instead of strstr for a single character

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

Summary of changes:
 nsswitch/pam_winbind.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 52a8daa..82c8c4d 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -1144,7 +1144,7 @@ static bool winbind_name_list_to_sid_string_list(struct 
pwb_context *ctx,
        }
 
        search_location = name_list;
-       while ((comma = strstr(search_location, ",")) != NULL) {
+       while ((comma = strchr(search_location, ',')) != NULL) {
                current_name = strndup(search_location,
                                       comma - search_location);
                if (NULL == current_name) {
@@ -1199,10 +1199,8 @@ static bool winbind_name_list_to_sid_string_list(struct 
pwb_context *ctx,
                 * It is malformated parameter here, overwrite the last ','.
                 */
                len = strlen(sid_list_buffer);
-               if (len) {
-                       if (sid_list_buffer[len - 1] == ',') {
-                               sid_list_buffer[len - 1] = '\0';
-                       }
+               if ((len != 0) && (sid_list_buffer[len - 1] == ',')) {
+                       sid_list_buffer[len - 1] = '\0';
                }
        }
 


-- 
Samba Shared Repository

Reply via email to