-
- [root@localhost fossil-2.4]# gdb ./fossil [45/2179]
- GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7
- Copyright (C) 2013 Free Software Foundation, Inc.
- License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law. Type "show copying"
- and "show warranty" for details.
- This GDB was configured as "x86_64-redhat-linux-gnu".
- For bug reporting instructions, please see:
- <http://www.gnu.org/software/gdb/bugs/>...
- Reading symbols from /root/fossil-2.4/fossil...done.
- (gdb) break repo_list_page
- Breakpoint 1 at 0x45c1ce: file ./src/main.c, line 1240.
- (gdb) run http --repolist /fossils <r1.txt
- Starting program: /root/fossil-2.4/./fossil http --repolist /fossils <r1.txt
- [Thread debugging using libthread_db enabled]
- Using host libthread_db library "/lib64/libthread_db.so.1".
-
- Breakpoint 1, repo_list_page () at ./src/main.c:1240
- 1240 int n = 0;
- Missing separate debuginfos, use: debuginfo-install glibc-2.17-196.el7_4.2.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-8.el7.x86_64 libcom_err-1.42.9-10.el7.x86_64 libselinux-2.5-11.el7.x86_64 openssl-libs-1.0.2k-8.el7.x86_64 pcre-8.32-17.el7.x86_64 zlib-1.2.7-17.el7.x86_64
- (gdb) n
- 1243 assert( g.db==0 );
- (gdb) n
- 1244 if( fossil_strcmp(g.zRepositoryName,"/")==0 && !g.fJail ){
- (gdb) n
- 1264 blob_init(&base, g.zRepositoryName, -1);
- (gdb) n
- 1265 sqlite3_open(":memory:", &g.db);
- (gdb) n
- 1266 db_multi_exec("CREATE TABLE sfile(pathname TEXT);");
- (gdb) n
- 1267 db_multi_exec("CREATE TABLE vfile(pathname);");
- (gdb) n
- 1268 vfile_scan(&base, blob_size(&base), 0, 0, 0);
- (gdb) n
- 1269 db_multi_exec("DELETE FROM sfile WHERE pathname NOT GLOB '*[^/].fossil'");
- (gdb) n
- 1270 allRepo = 0;
- (gdb) n
- 1272 @ <html>
- (gdb) n
- 1278 n = db_int(0, "SELECT count(*) FROM sfile");
- (gdb) n
- 1279 if( n>0 ){
- (gdb) n
- 1308 @ <h1>No Repositories Found</h1>
- (gdb) n
- 1310 @ </body>
- (gdb) n
- 1312 cgi_reply();
- (gdb) n
- HTTP/1.0 200 OK
- Date: Thu, 21 Dec 2017 19:02:47 GMT
- Connection: close
- X-UA-Compatible: IE=edge
- X-Frame-Options: SAMEORIGIN
- Cache-control: no-cache
- Content-Type: text/html; charset=utf-8
- Content-Length: 132
-
- <html>
- <head>
- <base href="http:///" />
- <title>Repository List</title>
- </head>
- <body>
- <h1>No Repositories Found</h1>
- </body>
- </html>
- 1313 sqlite3_close(g.db);
- (gdb) n
- 1314 g.db = 0;
- (gdb) n
- 1315 return n;
- (gdb) n
- 1316 }
- (gdb) n
- process_one_web_page (zNotFound=0x0, pFileGlob=0x0, allowRepoList=1) at ./src/main.c:1497
- 1497 }else if( zNotFound ){
- (gdb) n
- 1506 @ <h1>Not Found</h1>
- (gdb) n
- 1507 cgi_set_status(404, "not found");
- (gdb) n
- 1508 cgi_reply();
- (gdb) n
- HTTP/1.0 404 not found
- Date: Thu, 21 Dec 2017 19:03:14 GMT
- Connection: close
- X-UA-Compatible: IE=edge
- X-Frame-Options: SAMEORIGIN
- Cache-control: no-cache
- Content-Type: text/html; charset=utf-8
- Content-Length: 151
-
- <html>
- <head>
- <base href="http:///" />
- <title>Repository List</title>
- </head>
- <body>
- <h1>No Repositories Found</h1>
- </body>
- </html>
- <h1>Not Found</h1>
- 1510 return;
- (gdb) n
- 1706 }
- (gdb) n
- cmd_http () at ./src/main.c:2226
- 2226 }
- (gdb) n
- main (argc=4, argv=0x7fffffffe678) at ./src/main.c:768
- 768 fossil_exit(0);
- (gdb) n
- [Inferior 1 (process 12740) exited normally]
- (gdb) q
- [root@localhost fossil-2.4]# ls -alh /fossils/
- total 1.6M
- drwxr-xr-x 1 foouser foouser 8 Dec 21 14:12 .
- dr-xr-xr-x. 18 root root 259 Dec 21 13:55 ..
- -rw-r--r-- 1 foouser foouser 272K Dec 21 11:15 archsetup.fossil
- -rw-r--r-- 1 foouser foouser 224K Dec 21 11:15 guac-install-script.fossil
- -rw-r--r-- 1 foouser foouser 224K Dec 21 11:15 miscreports.fossil
- -rwxrwxrwx 1 foouser foouser 308K Dec 21 14:12 pkgReport.fossil
- -rw-r--r-- 1 foouser foouser 596K Dec 21 11:31 servercfg.fossil
-