Fossil

Check-in [b4d538f8c6]
Login

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

Overview
Comment:No longer require that the HOME directory is writable if the fossil configuration file is already there. (With some simplifications)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b4d538f8c6149decf073f001ba1953990ba1c12a
User & Date: jan.nijtmans 2014-01-23 10:29:10.787
Context
2014-01-24
09:54
Put Th_SubCommand constant tables in constant memory. check-in: dce90fe35e user: jan.nijtmans tags: trunk
2014-01-23
21:47
merge trunk check-in: abb2400434 user: jan.nijtmans tags: win32-longpath
10:29
No longer require that the HOME directory is writable if the fossil configuration file is already there. (With some simplifications) check-in: b4d538f8c6 user: jan.nijtmans tags: trunk
08:51
Backout [77d37d910b], which puts back the "fossil sqlite3" command when compiled with --disable-internal-sqlite. Take over matching "shell.c" from SQLite, but relax SQLite version check, otherwise "fossil sqlite3" doesn't work (that was the reason for taking out "fossil sqlite3" in the first place, but at least OpenBSD wants to support it). See: [https://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg14185.html] check-in: d68cd57a9d user: jan.nijtmans tags: trunk
00:51
Procedure of checking permission of global config is chenged. Now you can share global config in home directory from cgi. SeeAlso: http://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg14482.html Closed-Leaf check-in: f47298b25c user: kameda tags: config-permission-check
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/db.c.
829
830
831
832
833
834
835
836
837
838
839
840
841



842
843
844
845
846
847
848
849
850
851
852
853
854
855
  if( file_isdir(zHome)!=1 ){
    fossil_fatal("invalid home directory: %s", zHome);
  }
#if defined(_WIN32) || defined(__CYGWIN__)
  /* . filenames give some window systems problems and many apps problems */
  zDbName = mprintf("%//_fossil", zHome);
#else
  if( file_access(zHome, W_OK) ){
    fossil_fatal("home directory %s must be writeable", zHome);
  }
  zDbName = mprintf("%s/.fossil", zHome);
#endif
  if( file_size(zDbName)<1024*3 ){



    db_init_database(zDbName, zConfigSchema, (char*)0);
  }
#if defined(_WIN32) || defined(__CYGWIN__)
  if( file_access(zDbName, W_OK) ){
    fossil_fatal("configuration file %s must be writeable", zDbName);
  }
#endif
  if( useAttach ){
    db_open_or_attach(zDbName, "configdb", &g.useAttach);
    g.dbConfig = 0;
    g.zConfigDbType = 0;
  }else{
    g.useAttach = 0;
    g.dbConfig = db_open(zDbName);







<
<
<



>
>
>


<



<







829
830
831
832
833
834
835



836
837
838
839
840
841
842
843

844
845
846

847
848
849
850
851
852
853
  if( file_isdir(zHome)!=1 ){
    fossil_fatal("invalid home directory: %s", zHome);
  }
#if defined(_WIN32) || defined(__CYGWIN__)
  /* . filenames give some window systems problems and many apps problems */
  zDbName = mprintf("%//_fossil", zHome);
#else



  zDbName = mprintf("%s/.fossil", zHome);
#endif
  if( file_size(zDbName)<1024*3 ){
    if( file_access(zHome, W_OK) ){
      fossil_fatal("home directory %s must be writeable", zHome);
    }
    db_init_database(zDbName, zConfigSchema, (char*)0);
  }

  if( file_access(zDbName, W_OK) ){
    fossil_fatal("configuration file %s must be writeable", zDbName);
  }

  if( useAttach ){
    db_open_or_attach(zDbName, "configdb", &g.useAttach);
    g.dbConfig = 0;
    g.zConfigDbType = 0;
  }else{
    g.useAttach = 0;
    g.dbConfig = db_open(zDbName);