Author: gd Date: 2006-07-17 22:09:33 +0000 (Mon, 17 Jul 2006) New Revision: 17101
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17101 Log: Some merges from SAMBA_3_0/trunk (checked in post 3.0.23 and pre trunk link-over). Guenther Modified: branches/SAMBA_3_0_23/source/nsswitch/pam_winbind.c branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c branches/SAMBA_3_0_23/source/nsswitch/winbindd_util.c Changeset: Modified: branches/SAMBA_3_0_23/source/nsswitch/pam_winbind.c =================================================================== --- branches/SAMBA_3_0_23/source/nsswitch/pam_winbind.c 2006-07-17 21:24:56 UTC (rev 17100) +++ branches/SAMBA_3_0_23/source/nsswitch/pam_winbind.c 2006-07-17 22:09:33 UTC (rev 17101) @@ -750,8 +750,8 @@ } } } else { - _pam_log(LOG_NOTICE - ,"could not recover authentication token"); + _pam_log(LOG_NOTICE, "could not recover authentication token"); + retval = PAM_AUTHTOK_RECOVER_ERR; } } Modified: branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c =================================================================== --- branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c 2006-07-17 21:24:56 UTC (rev 17100) +++ branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c 2006-07-17 22:09:33 UTC (rev 17101) @@ -1891,7 +1891,8 @@ /* when working offline we must not clear the cache on restart */ wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, - TDB_DEFAULT /*TDB_CLEAR_IF_FIRST*/, O_RDWR|O_CREAT, 0600); + lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST), + O_RDWR|O_CREAT, 0600); if (wcache->tdb == NULL) { DEBUG(0,("Failed to open winbindd_cache.tdb!\n")); @@ -2133,7 +2134,8 @@ /* when working offline we must not clear the cache on restart */ wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, - TDB_DEFAULT /* TDB_CLEAR_IF_FIRST */, O_RDWR|O_CREAT, 0600); + lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST), + O_RDWR|O_CREAT, 0600); if (!wcache->tdb) { DEBUG(0,("Failed to open winbindd_cache.tdb!\n")); Modified: branches/SAMBA_3_0_23/source/nsswitch/winbindd_util.c =================================================================== --- branches/SAMBA_3_0_23/source/nsswitch/winbindd_util.c 2006-07-17 21:24:56 UTC (rev 17100) +++ branches/SAMBA_3_0_23/source/nsswitch/winbindd_util.c 2006-07-17 22:09:33 UTC (rev 17101) @@ -1211,13 +1211,13 @@ int ret = nscd_flush_cache("passwd"); if (ret) { DEBUG(5,("failed to flush nscd cache for 'passwd' service: %s\n", - strerror(ret))); + strerror(errno))); } ret = nscd_flush_cache("group"); if (ret) { DEBUG(5,("failed to flush nscd cache for 'group' service: %s\n", - strerror(ret))); + strerror(errno))); } #else return;