Better prompting with su.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1629 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		@@ -290,11 +290,25 @@ siad_ses_suauthent(sia_collect_func_t *collect,
 | 
				
			|||||||
      return SIADFAIL;
 | 
					      return SIADFAIL;
 | 
				
			||||||
    if(entity->password == NULL){
 | 
					    if(entity->password == NULL){
 | 
				
			||||||
	prompt_t prompt;
 | 
						prompt_t prompt;
 | 
				
			||||||
 | 
						int ret;
 | 
				
			||||||
	if(collect == NULL)
 | 
						if(collect == NULL)
 | 
				
			||||||
	    return SIADFAIL;
 | 
						    return SIADFAIL;
 | 
				
			||||||
	setup_password(entity, &prompt);
 | 
						setup_password(entity, &prompt);
 | 
				
			||||||
	if((*collect)(0, SIAONELINER, (unsigned char*)"", 1, 
 | 
						prompt.prompt = malloc(strlen(toname) + strlen(toinst) + 
 | 
				
			||||||
		      &prompt) != SIACOLSUCCESS)
 | 
								       strlen(realm) + sizeof("'s Password: ") + 2);
 | 
				
			||||||
 | 
						if(prompt.prompt == NULL)
 | 
				
			||||||
 | 
						    return SIADFAIL;
 | 
				
			||||||
 | 
						strcpy(prompt.prompt, toname);
 | 
				
			||||||
 | 
						if(toinst[0]){
 | 
				
			||||||
 | 
						    strcat(prompt.prompt, ".");
 | 
				
			||||||
 | 
						    strcat(prompt.prompt, toinst);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						strcat(prompt.prompt, "@");
 | 
				
			||||||
 | 
						strcat(prompt.prompt, realm);
 | 
				
			||||||
 | 
						strcat(prompt.prompt, "'s Password: ");
 | 
				
			||||||
 | 
						ret = (*collect)(0, SIAONELINER, (unsigned char*)"", 1, &prompt);
 | 
				
			||||||
 | 
						free(prompt.prompt);
 | 
				
			||||||
 | 
						if(ret != SIACOLSUCCESS)
 | 
				
			||||||
	    return SIADFAIL;
 | 
						    return SIADFAIL;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if(entity->password == NULL)
 | 
					    if(entity->password == NULL)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user