spacepaste

  1.  
  2. [root@localhost fossil-2.4]# gdb ./fossil [45/2179]
  3. GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7
  4. Copyright (C) 2013 Free Software Foundation, Inc.
  5. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  6. This is free software: you are free to change and redistribute it.
  7. There is NO WARRANTY, to the extent permitted by law. Type "show copying"
  8. and "show warranty" for details.
  9. This GDB was configured as "x86_64-redhat-linux-gnu".
  10. For bug reporting instructions, please see:
  11. <http://www.gnu.org/software/gdb/bugs/>...
  12. Reading symbols from /root/fossil-2.4/fossil...done.
  13. (gdb) break repo_list_page
  14. Breakpoint 1 at 0x45c1ce: file ./src/main.c, line 1240.
  15. (gdb) run http --repolist /fossils <r1.txt
  16. Starting program: /root/fossil-2.4/./fossil http --repolist /fossils <r1.txt
  17. [Thread debugging using libthread_db enabled]
  18. Using host libthread_db library "/lib64/libthread_db.so.1".
  19. Breakpoint 1, repo_list_page () at ./src/main.c:1240
  20. 1240 int n = 0;
  21. 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
  22. (gdb) n
  23. 1243 assert( g.db==0 );
  24. (gdb) n
  25. 1244 if( fossil_strcmp(g.zRepositoryName,"/")==0 && !g.fJail ){
  26. (gdb) n
  27. 1264 blob_init(&base, g.zRepositoryName, -1);
  28. (gdb) n
  29. 1265 sqlite3_open(":memory:", &g.db);
  30. (gdb) n
  31. 1266 db_multi_exec("CREATE TABLE sfile(pathname TEXT);");
  32. (gdb) n
  33. 1267 db_multi_exec("CREATE TABLE vfile(pathname);");
  34. (gdb) n
  35. 1268 vfile_scan(&base, blob_size(&base), 0, 0, 0);
  36. (gdb) n
  37. 1269 db_multi_exec("DELETE FROM sfile WHERE pathname NOT GLOB '*[^/].fossil'");
  38. (gdb) n
  39. 1270 allRepo = 0;
  40. (gdb) n
  41. 1272 @ <html>
  42. (gdb) n
  43. 1278 n = db_int(0, "SELECT count(*) FROM sfile");
  44. (gdb) n
  45. 1279 if( n>0 ){
  46. (gdb) n
  47. 1308 @ <h1>No Repositories Found</h1>
  48. (gdb) n
  49. 1310 @ </body>
  50. (gdb) n
  51. 1312 cgi_reply();
  52. (gdb) n
  53. HTTP/1.0 200 OK
  54. Date: Thu, 21 Dec 2017 19:02:47 GMT
  55. Connection: close
  56. X-UA-Compatible: IE=edge
  57. X-Frame-Options: SAMEORIGIN
  58. Cache-control: no-cache
  59. Content-Type: text/html; charset=utf-8
  60. Content-Length: 132
  61. <html>
  62. <head>
  63. <base href="http:///" />
  64. <title>Repository List</title>
  65. </head>
  66. <body>
  67. <h1>No Repositories Found</h1>
  68. </body>
  69. </html>
  70. 1313 sqlite3_close(g.db);
  71. (gdb) n
  72. 1314 g.db = 0;
  73. (gdb) n
  74. 1315 return n;
  75. (gdb) n
  76. 1316 }
  77. (gdb) n
  78. process_one_web_page (zNotFound=0x0, pFileGlob=0x0, allowRepoList=1) at ./src/main.c:1497
  79. 1497 }else if( zNotFound ){
  80. (gdb) n
  81. 1506 @ <h1>Not Found</h1>
  82. (gdb) n
  83. 1507 cgi_set_status(404, "not found");
  84. (gdb) n
  85. 1508 cgi_reply();
  86. (gdb) n
  87. HTTP/1.0 404 not found
  88. Date: Thu, 21 Dec 2017 19:03:14 GMT
  89. Connection: close
  90. X-UA-Compatible: IE=edge
  91. X-Frame-Options: SAMEORIGIN
  92. Cache-control: no-cache
  93. Content-Type: text/html; charset=utf-8
  94. Content-Length: 151
  95. <html>
  96. <head>
  97. <base href="http:///" />
  98. <title>Repository List</title>
  99. </head>
  100. <body>
  101. <h1>No Repositories Found</h1>
  102. </body>
  103. </html>
  104. <h1>Not Found</h1>
  105. 1510 return;
  106. (gdb) n
  107. 1706 }
  108. (gdb) n
  109. cmd_http () at ./src/main.c:2226
  110. 2226 }
  111. (gdb) n
  112. main (argc=4, argv=0x7fffffffe678) at ./src/main.c:768
  113. 768 fossil_exit(0);
  114. (gdb) n
  115. [Inferior 1 (process 12740) exited normally]
  116. (gdb) q
  117. [root@localhost fossil-2.4]# ls -alh /fossils/
  118. total 1.6M
  119. drwxr-xr-x 1 foouser foouser 8 Dec 21 14:12 .
  120. dr-xr-xr-x. 18 root root 259 Dec 21 13:55 ..
  121. -rw-r--r-- 1 foouser foouser 272K Dec 21 11:15 archsetup.fossil
  122. -rw-r--r-- 1 foouser foouser 224K Dec 21 11:15 guac-install-script.fossil
  123. -rw-r--r-- 1 foouser foouser 224K Dec 21 11:15 miscreports.fossil
  124. -rwxrwxrwx 1 foouser foouser 308K Dec 21 14:12 pkgReport.fossil
  125. -rw-r--r-- 1 foouser foouser 596K Dec 21 11:31 servercfg.fossil
  126.