Fossil SCM

Fix several compiler warnings, etc.

mistachkin 2021-12-17 23:53 UTC chrootOpt
Commit 6397ece5891ba17c0c939b1be3bd2be6d08aa6d046293ed194a774c27ea75518
1 file changed +3 -2
+3 -2
--- src/main.c
+++ src/main.c
@@ -2720,11 +2720,11 @@
27202720
if( zIpAddr && zIpAddr[0] ){
27212721
g.fSshClient |= CGI_SSH_CLIENT;
27222722
}
27232723
}
27242724
if( zChRoot ){
2725
- enter_chroot_jail(zChRoot, noJail);
2725
+ enter_chroot_jail((char*)zChRoot, noJail);
27262726
}else{
27272727
g.zRepositoryName = enter_chroot_jail(g.zRepositoryName, noJail);
27282728
}
27292729
if( useSCGI ){
27302730
cgi_handle_scgi_request();
@@ -2954,10 +2954,11 @@
29542954
char *zBrowserCmd = 0; /* Command to launch the web browser */
29552955
int isUiCmd; /* True if command is "ui", not "server' */
29562956
const char *zNotFound; /* The --notfound option or NULL */
29572957
int flags = 0; /* Server flags */
29582958
#if !defined(_WIN32)
2959
+ const char *zChRoot; /* Use for chroot instead of repository path */
29592960
int noJail; /* Do not enter the chroot jail */
29602961
const char *zTimeout = 0; /* Max runtime of any single HTTP request */
29612962
#endif
29622963
int allowRepoList; /* List repositories on URL "/" */
29632964
const char *zAltBase; /* Argument to the --baseurl option */
@@ -3186,11 +3187,11 @@
31863187
find_server_repository(2, 0);
31873188
if( fossil_strcmp(g.zRepositoryName,"/")==0 ){
31883189
allowRepoList = 1;
31893190
}else{
31903191
if( zChRoot ){
3191
- enter_chroot_jail(zChRoot, noJail);
3192
+ enter_chroot_jail((char*)zChRoot, noJail);
31923193
}else{
31933194
g.zRepositoryName = enter_chroot_jail(g.zRepositoryName, noJail);
31943195
}
31953196
}
31963197
if( flags & HTTP_SERVER_SCGI ){
31973198
--- src/main.c
+++ src/main.c
@@ -2720,11 +2720,11 @@
2720 if( zIpAddr && zIpAddr[0] ){
2721 g.fSshClient |= CGI_SSH_CLIENT;
2722 }
2723 }
2724 if( zChRoot ){
2725 enter_chroot_jail(zChRoot, noJail);
2726 }else{
2727 g.zRepositoryName = enter_chroot_jail(g.zRepositoryName, noJail);
2728 }
2729 if( useSCGI ){
2730 cgi_handle_scgi_request();
@@ -2954,10 +2954,11 @@
2954 char *zBrowserCmd = 0; /* Command to launch the web browser */
2955 int isUiCmd; /* True if command is "ui", not "server' */
2956 const char *zNotFound; /* The --notfound option or NULL */
2957 int flags = 0; /* Server flags */
2958 #if !defined(_WIN32)
 
2959 int noJail; /* Do not enter the chroot jail */
2960 const char *zTimeout = 0; /* Max runtime of any single HTTP request */
2961 #endif
2962 int allowRepoList; /* List repositories on URL "/" */
2963 const char *zAltBase; /* Argument to the --baseurl option */
@@ -3186,11 +3187,11 @@
3186 find_server_repository(2, 0);
3187 if( fossil_strcmp(g.zRepositoryName,"/")==0 ){
3188 allowRepoList = 1;
3189 }else{
3190 if( zChRoot ){
3191 enter_chroot_jail(zChRoot, noJail);
3192 }else{
3193 g.zRepositoryName = enter_chroot_jail(g.zRepositoryName, noJail);
3194 }
3195 }
3196 if( flags & HTTP_SERVER_SCGI ){
3197
--- src/main.c
+++ src/main.c
@@ -2720,11 +2720,11 @@
2720 if( zIpAddr && zIpAddr[0] ){
2721 g.fSshClient |= CGI_SSH_CLIENT;
2722 }
2723 }
2724 if( zChRoot ){
2725 enter_chroot_jail((char*)zChRoot, noJail);
2726 }else{
2727 g.zRepositoryName = enter_chroot_jail(g.zRepositoryName, noJail);
2728 }
2729 if( useSCGI ){
2730 cgi_handle_scgi_request();
@@ -2954,10 +2954,11 @@
2954 char *zBrowserCmd = 0; /* Command to launch the web browser */
2955 int isUiCmd; /* True if command is "ui", not "server' */
2956 const char *zNotFound; /* The --notfound option or NULL */
2957 int flags = 0; /* Server flags */
2958 #if !defined(_WIN32)
2959 const char *zChRoot; /* Use for chroot instead of repository path */
2960 int noJail; /* Do not enter the chroot jail */
2961 const char *zTimeout = 0; /* Max runtime of any single HTTP request */
2962 #endif
2963 int allowRepoList; /* List repositories on URL "/" */
2964 const char *zAltBase; /* Argument to the --baseurl option */
@@ -3186,11 +3187,11 @@
3187 find_server_repository(2, 0);
3188 if( fossil_strcmp(g.zRepositoryName,"/")==0 ){
3189 allowRepoList = 1;
3190 }else{
3191 if( zChRoot ){
3192 enter_chroot_jail((char*)zChRoot, noJail);
3193 }else{
3194 g.zRepositoryName = enter_chroot_jail(g.zRepositoryName, noJail);
3195 }
3196 }
3197 if( flags & HTTP_SERVER_SCGI ){
3198

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button