Bug 287768. Added option to use session{USER} keychain to cli.
This commit is contained in:
parent
df855e3a38
commit
3f35a10763
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 27 09:15:14 MDT 2007 - jnorman@novell.com
|
||||
|
||||
- Bug 287768. Added option to use session(User) keychain to cli
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 18 16:15:21 MDT 2007 - jnorman@novell.com
|
||||
|
||||
|
@ -52,6 +52,7 @@ char *keyName = NULL;
|
||||
char *uid = NULL;
|
||||
|
||||
int iAction = 0;
|
||||
int iUseSessionKeyChain = 0;
|
||||
|
||||
|
||||
#define BADCHAR (int)'?'
|
||||
@ -94,8 +95,16 @@ void* OpenStore(SSCS_KEYCHAIN_ID_T *kc)
|
||||
return NULL; // NSSCS_E_SYSTEM_FAILURE;
|
||||
}
|
||||
|
||||
sscs_Utf8Strcpy(kc->keychainID, SSCS_SERVER_KEY_CHAIN_ID);
|
||||
kc->len = SSCS_S_KC_ID_SERVER_CHARS;
|
||||
if (iUseSessionKeyChain)
|
||||
{
|
||||
sscs_Utf8Strcpy(kc->keychainID, SSCS_SESSION_KEY_CHAIN_ID);
|
||||
kc->len = SSCS_S_KC_ID_CHARS;
|
||||
}
|
||||
else
|
||||
{
|
||||
sscs_Utf8Strcpy(kc->keychainID, SSCS_SERVER_KEY_CHAIN_ID);
|
||||
kc->len = SSCS_S_KC_ID_SERVER_CHARS;
|
||||
}
|
||||
|
||||
return context;
|
||||
|
||||
@ -493,7 +502,7 @@ int main
|
||||
return 0;
|
||||
}
|
||||
|
||||
while ((c = sss_GetOpt(argc, argv, "lLhHsSgGdDrRn=N=k=K=u=U=")) != -1)
|
||||
while ((c = sss_GetOpt(argc, argv, "lLoOhHsSgGdDrRn=N=k=K=u=U=")) != -1)
|
||||
{
|
||||
//printf("processing arg \r\n");
|
||||
switch(c)
|
||||
@ -504,6 +513,11 @@ int main
|
||||
//ListCredentials();
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
case 'O':
|
||||
iUseSessionKeyChain = 1;
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
case 'R':
|
||||
iAction = REMOVECREDS;
|
||||
@ -563,7 +577,8 @@ int main
|
||||
printf(" -n [name] Specify the credential name\r\n");
|
||||
printf(" -k [key] Specify the key name to set\r\n");
|
||||
printf(" -u [uid] Specify the UID of the process\r\n");
|
||||
|
||||
printf("\r\n");
|
||||
printf(" -o Override services keychain and use current user(UID) keychain for operation\r\n");
|
||||
|
||||
printf("\r\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user