From: SourceForge.net <no...@so...> - 2006-06-06 21:37:50
|
Patches item #1501899, was opened at 2006-06-06 14:37 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=381349&aid=1501899&group_id=24366 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: patch to read optionally password from file Initial Comment: Simple changes for rdesktop 1.4.1 to read from file instead of reading stdin or passing via command-line. not perfect, but a little better security. 128c128 < fprintf(stderr, " -p: password (- to prompt)\n"); --- > fprintf(stderr, " -p: password (- to prompt, -filename to read)\n"); 281a282,306 > if( password[0] == '-' && password[1] != 0 ) > { > password[0]=0; > int fn,x; > if( ! ( fn=open(password+1,O_RDONLY) ) ) > { > return False; > } > if( ! read(fn,password,size) ) > { > return False; > } > password[size-1]=0; > for(x=0; password[x]; ++x) > { > if( password[x] == '\r' || password[x] == '\n' ) > { > password[x]=0; > break; > } > } > close(fn); > return True; > } > 435c460 < if ((optarg[0] == '-') && (optarg[1] == 0)) --- > if ( optarg[0] == '-' ) 436a462 > STRNCPY(password, optarg, sizeof(password)); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=381349&aid=1501899&group_id=24366 |