Fossil

Check-in [554d4caa]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Disable prompts for a password if fossil is not running on an interactive terminal.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 554d4caa5ab04443e1be2445d8e9cbb97d924f25
User & Date: drh 2010-03-05 00:08:17
Context
2010-03-05
00:45
If no password is supplied, give the user a single opportunity to enter the password (if they are on a tty) then fail the clone. check-in: 03ed0836 user: drh tags: trunk
00:10
Pull over from the trunk all recent changes for which we have clear title. check-in: b9d3b428 user: drh tags: clear-title
00:08
Disable prompts for a password if fossil is not running on an interactive terminal. check-in: 554d4caa user: drh tags: trunk
2010-03-04
23:51
Add the FOSSIL_ALLOW_OUT_OF_ORDER_DATES compile-time option to disable the check that forces new check-ins to be younger than their parents. check-in: 62b4df4e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/url.c.

308
309
310
311
312
313
314

315
316
317
318
319
320



321

}

/*
** Prompt the user for the password for g.urlUser.  Store the result
** in g.urlPasswd.
*/
void url_prompt_for_password(void){

  char *zPrompt = mprintf("password for %s: ", g.urlUser);
  Blob x;
  prompt_for_password(zPrompt, &x, 0);
  free(zPrompt);
  g.urlPasswd = mprintf("%b", &x);
  blob_reset(&x);



}








>
|
|
|
|
|
|
>
>
>
|
>
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
}

/*
** Prompt the user for the password for g.urlUser.  Store the result
** in g.urlPasswd.
*/
void url_prompt_for_password(void){
  if( isatty(fileno(stdin)) ){
    char *zPrompt = mprintf("password for %s: ", g.urlUser);
    Blob x;
    prompt_for_password(zPrompt, &x, 0);
    free(zPrompt);
    g.urlPasswd = mprintf("%b", &x);
    blob_reset(&x);
  }else{
    fossil_fatal("missing or incorrect password for user \"%s\"",
                 g.urlUser);
  }
}