Fossil

Check-in [ace9e00f]
Login

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

Overview
Comment:Change db_create_default_users() to align its use of environment variables to set the user name to match user_select(), and try all variables on both Unix and Windows.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ross-doc-env
Files: files | file ages | folders
SHA1:ace9e00f965b187b717c871ccf6a2225f1d1faa4
User & Date: rberteig 2016-03-01 21:38:36
Context
2016-03-02
01:56
Add new test-usernames command to dump all of the various sources of the current user name in the order tested. check-in: 5de13cb1 user: rberteig tags: ross-doc-env
2016-03-01
21:38
Change db_create_default_users() to align its use of environment variables to set the user name to match user_select(), and try all variables on both Unix and Windows. check-in: ace9e00f user: rberteig tags: ross-doc-env
2016-02-29
19:03
Improve description of the '--no-th-hook' command line argument. check-in: a56f2089 user: mistachkin tags: ross-doc-env
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/db.c.

1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527

1528
1529
1530
1531


1532
1533
1534
1535
1536
1537
1538
  if( zUser==0 ){
    zUser = db_get("default-user", 0);
  }
  if( zUser==0 ){
    zUser = fossil_getenv("FOSSIL_USER");
  }
  if( zUser==0 ){
#if defined(_WIN32)
    zUser = fossil_getenv("USERNAME");
#else
    zUser = fossil_getenv("USER");

    if( zUser==0 ){
      zUser = fossil_getenv("LOGNAME");
    }
#endif


  }
  if( zUser==0 ){
    zUser = "root";
  }
  db_multi_exec(
     "INSERT OR IGNORE INTO user(login, info) VALUES(%Q,'')", zUser
  );







<
<
<

>
|
|
|
<
>
>







1517
1518
1519
1520
1521
1522
1523



1524
1525
1526
1527
1528

1529
1530
1531
1532
1533
1534
1535
1536
1537
  if( zUser==0 ){
    zUser = db_get("default-user", 0);
  }
  if( zUser==0 ){
    zUser = fossil_getenv("FOSSIL_USER");
  }
  if( zUser==0 ){



    zUser = fossil_getenv("USER");
  }
  if( zUser==0 ){
    zUser = fossil_getenv("LOGNAME");
  }

  if( zUser==0 ){
    zUser = fossil_getenv("USERNAME");
  }
  if( zUser==0 ){
    zUser = "root";
  }
  db_multi_exec(
     "INSERT OR IGNORE INTO user(login, info) VALUES(%Q,'')", zUser
  );