Bug 401524. Fix to get correct LUID when ReadBinaryKey is called. (Windows only change for ZEN)
This commit is contained in:
		| @@ -1,3 +1,9 @@ | |||||||
|  | ------------------------------------------------------------------- | ||||||
|  | Wed Jun 25 10:46:21 MDT 2008 - jnorman@novell.com | ||||||
|  |  | ||||||
|  | - Bug 401524. Fixed bug that properly caches binary tokens. | ||||||
|  |   Affects windows only. | ||||||
|  |  | ||||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ||||||
| Mon Jun  2 15:05:21 MDT 2008 - jnorman@novell.com | Mon Jun  2 15:05:21 MDT 2008 - jnorman@novell.com | ||||||
|  |  | ||||||
|   | |||||||
| @@ -140,8 +140,8 @@ namespace sscs.verbs | |||||||
|  |  | ||||||
|                     // WINDOWS LUID |                     // WINDOWS LUID | ||||||
|                     // System Services, like DLU create fake UIDs, store credentials and then want to read that data. |                     // System Services, like DLU create fake UIDs, store credentials and then want to read that data. | ||||||
|                     luidLow = BitConverter.ToInt32(inBuf, 18 + ((int)keyChainIdLen) + ((int)secretIdLen) + 8); |                     luidLow = BitConverter.ToInt32(inBuf, 22 + ((int)keyChainIdLen) + ((int)secretIdLen) + ((int)keyLen) + 8); | ||||||
|                     luidHigh = BitConverter.ToInt32(inBuf, 18 + ((int)keyChainIdLen) + ((int)secretIdLen) + 12); |                     luidHigh = BitConverter.ToInt32(inBuf, 22 + ((int)keyChainIdLen) + ((int)secretIdLen) + ((int)keyLen) + 12); | ||||||
|  |  | ||||||
|                     // this code is for ZEN.  Here we switch to a keychain who's ID is the LUID of the user logging in.   |                     // this code is for ZEN.  Here we switch to a keychain who's ID is the LUID of the user logging in.   | ||||||
|                     // ZEN processes run as system and pass the LUID in the extension parameter. |                     // ZEN processes run as system and pass the LUID in the extension parameter. | ||||||
|   | |||||||
| @@ -140,8 +140,8 @@ namespace sscs.verbs | |||||||
|  |  | ||||||
|                     // WINDOWS LUID |                     // WINDOWS LUID | ||||||
|                     // System Services, like DLU create fake UIDs, store credentials and then want to read that data. |                     // System Services, like DLU create fake UIDs, store credentials and then want to read that data. | ||||||
|                     luidLow = BitConverter.ToInt32(inBuf, 18 + ((int)keyChainIdLen) + ((int)secretIdLen) + 8); |                     luidLow = BitConverter.ToInt32(inBuf, 22 + ((int)keyChainIdLen) + ((int)secretIdLen) + ((int)keyLen) + 8); | ||||||
|                     luidHigh = BitConverter.ToInt32(inBuf, 18 + ((int)keyChainIdLen) + ((int)secretIdLen) + 12); |                     luidHigh = BitConverter.ToInt32(inBuf, 22 + ((int)keyChainIdLen) + ((int)secretIdLen) + ((int)keyLen) + 12); | ||||||
|  |  | ||||||
|                     // this code is for ZEN.  Here we switch to a keychain who's ID is the LUID of the user logging in.   |                     // this code is for ZEN.  Here we switch to a keychain who's ID is the LUID of the user logging in.   | ||||||
|                     // ZEN processes run as system and pass the LUID in the extension parameter. |                     // ZEN processes run as system and pass the LUID in the extension parameter. | ||||||
|   | |||||||
| @@ -138,6 +138,8 @@ namespace sscs.verbs | |||||||
| #if W32 | #if W32 | ||||||
|                 if (extId == 1) |                 if (extId == 1) | ||||||
| 				{ | 				{ | ||||||
|  |  | ||||||
|  |                     CSSSLogger.DbgLog("LUID ExtID found"); | ||||||
| 					// WINDOWS LUID | 					// WINDOWS LUID | ||||||
| 					// This is how the Login Capture module on windows, running as System, sets the Desktop Credential. | 					// This is how the Login Capture module on windows, running as System, sets the Desktop Credential. | ||||||
| 					// we might be able to change this if/when we abstract the session.     | 					// we might be able to change this if/when we abstract the session.     | ||||||
| @@ -178,6 +180,7 @@ namespace sscs.verbs | |||||||
|                                 CSSSLogger.DbgLog("WriteKey: Adding keychain returned error: " + e.ToString()); |                                 CSSSLogger.DbgLog("WriteKey: Adding keychain returned error: " + e.ToString()); | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
|  |                         CSSSLogger.DbgLog("WriteBinaryKey: Switching LUID to [" + luidHigh.ToString() + "][" + luidLow.ToString() + "]"); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
| #endif | #endif | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user