Fossil

Check-in [9122ad308a]
Login

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

Overview
Comment:Enable access check on HOME directory for win32/cygwin
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9122ad308a9392e72c82c7169301c4b9c084dbf4
User & Date: jan.nijtmans 2013-03-01 13:45:16.717
References
2013-03-04
19:18
revert [9122ad308a]. It appears that file_access() cannot bries on win32 check-in: 1eb9496c48 user: jan.nijtmans tags: trunk
Context
2013-03-01
23:33
Fix a harmless compiler warning in regexp.c. check-in: 520703dd55 user: drh tags: trunk
13:45
Enable access check on HOME directory for win32/cygwin check-in: 9122ad308a user: jan.nijtmans tags: trunk
13:19
Teach fossil_utf8_to_filename() how to handle win32 paths on Cygwin. Use this function where-ever possible. check-in: caf2eb25fa user: jan.nijtmans tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/db.c.
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
    fossil_fatal("cannot locate home directory - "
                 "please set the HOME environment variable");
  }
#endif
  if( file_isdir(zHome)!=1 ){
    fossil_fatal("invalid home directory: %s", zHome);
  }
#if !defined(_WIN32) && !defined(__CYGWIN__)
  if( file_access(zHome, W_OK) ){
    fossil_fatal("home directory %s must be writeable", zHome);
  }
#endif
  g.zHome = mprintf("%/", 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







<



<







824
825
826
827
828
829
830

831
832
833

834
835
836
837
838
839
840
    fossil_fatal("cannot locate home directory - "
                 "please set the HOME environment variable");
  }
#endif
  if( file_isdir(zHome)!=1 ){
    fossil_fatal("invalid home directory: %s", zHome);
  }

  if( file_access(zHome, W_OK) ){
    fossil_fatal("home directory %s must be writeable", zHome);
  }

  g.zHome = mprintf("%/", 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