Commit Graph

120 Commits

Author SHA1 Message Date
Björn Ketelaars
c42b8526f0 only root can chown. However, when running as root privileges are dropped. As such, it doesn't make sense to have a function like change_owner() 2015-09-19 19:57:02 +02:00
Björn Ketelaars
053bd8d5d6 drop privileges when running as root 2015-09-19 19:57:01 +02:00
Björn Ketelaars
36f8df2011 instead of using perror() use printf(). Removes ugly and useless error codes. While here move function to *.c 2015-09-19 19:57:01 +02:00
Björn Ketelaars
880e5edf1b return after error() does not make sense 2015-09-19 19:57:00 +02:00
solusipse
a284706e78 Merge pull request #19 from bket/cleanup
Cleanup
2015-09-19 18:49:06 +02:00
Björn Ketelaars
b1de821740 combine 2 if-statements. While here; spacing, spacing, spacing 2015-09-19 18:00:06 +02:00
Björn Ketelaars
7e33e463bb remove info(), instead used printf's. Check for DAEMON at some stages 2015-09-19 17:35:16 +02:00
Björn Ketelaars
f7926b75fc display_date() is only used one time, doesn't make sense to make it a function 2015-09-19 17:35:15 +02:00
Björn Ketelaars
f9d7f3d5c8 WARNING != ERROR 2015-09-19 17:35:15 +02:00
Björn Ketelaars
9c2919f01d move all info() lines from parse_parameters() to startup_message(). Move DAEMON = 1 to getopt 2015-09-19 17:35:14 +02:00
Björn Ketelaars
19c2d8df76 main() is exptected to return a value 2015-09-19 17:35:14 +02:00
solusipse
888b578907 Merge pull request #18 from bket/daemon
daemonizing fiche
2015-09-19 16:29:54 +02:00
Björn Ketelaars
2972046f5f modify README.md accordingly. While here explain -e option 2015-09-04 14:26:59 +02:00
Björn Ketelaars
6f16b43387 add option to daemonize fiche 2015-09-04 13:54:56 +02:00
Björn Ketelaars
7a2b8b1888 wrap printf in info() and replace a couple of printf statements 2015-09-04 13:54:55 +02:00
Björn Ketelaars
89c5fc8680 stop using display_line(). Instead use a printf statement 2015-09-04 13:54:55 +02:00
Björn Ketelaars
bb59a374a1 remove unused function *return_line() 2015-09-04 13:54:54 +02:00
solusipse
a0bbd2fa28 Merge pull request #15 from renaudallard/master
Multiple fixes
2015-08-29 16:12:12 +02:00
Renaud Allard
047ecf672c Add -e option to use the extended charset I committed before.
"reduced" charset makes it easier to remember the URL by default
2015-08-29 11:34:32 +02:00
Renaud Allard
73bc067641 Use arc4random on BSD systems to avoid complaints from the compiler 2015-08-27 16:37:13 +02:00
Renaud Allard
8ccfcc8c06 Avoid using strcpy and strcat
That will also remove the warnings given by picky compilers
2015-08-27 15:55:09 +02:00
Renaud Allard
caa6f5ed6a Former patch had a small bug, this has been corrected 2015-08-27 14:59:08 +02:00
Renaud Allard
1bc2132e1d Do not append a / at the end of the output path
Solves issue #13
2015-08-27 14:48:21 +02:00
Renaud Allard
d771d7bdfd Decrease the likeliness of name collisions 2015-08-27 14:36:36 +02:00
Renaud Allard
49ea4c7ccd Use MSG_DONTWAIT to use non blocking operation. This solves issue #14 2015-08-27 11:51:25 +02:00
Renaud Allard
318987c100 Correct a typo: lenght -> length 2015-08-27 10:33:39 +02:00
solusipse
a85e04d816 Merge pull request #10 from part1zano/master
Simplified Makefile
2015-05-04 19:30:56 +02:00
Maxim Kirenenko
48c540d83b Simplified Makefile 2015-05-02 22:56:36 +03:00
solusipse
c75f4b29a1 Merge pull request #9 from part1zano/master
Makefile: more *BSD-friendly, got rid of mandatory gcc
2015-05-02 17:14:29 +02:00
Maxim V Filimonov
7ee9910cac Makefile: more *BSD-friendly, got rid of mandatory gcc 2015-05-01 23:49:11 +03:00
solusipse
a7174e18db added travis sign 0.9 2014-09-09 05:49:43 +02:00
solusipse
b643f4a922 custom script parameter for travis 2014-09-09 05:42:13 +02:00
solusipse
629e8d3003 travis-ci 2014-09-09 05:37:00 +02:00
solusipse
157353707e changed logging format 2014-09-09 03:26:21 +02:00
solusipse
1d425525a1 removed unused variables 2013-11-01 11:03:17 +01:00
solusipse
c10d19e9d9 fixed code that caused warnings 2013-10-30 00:39:51 +01:00
solusipse
249413374d changed printing policy 2013-09-26 13:06:52 +02:00
solusipse
33f00487d0 issue #3 (rejecting http) 2013-09-26 12:36:29 +02:00
solusipse
0c3e6aacd4 added newline symbol at the end of two error messages 2013-09-22 21:43:09 +02:00
solusipse
eabb2f5b97 increased slug array size 2013-09-18 01:10:50 +02:00
solusipse
32dbdfe86f increased slug array size 2013-09-18 01:02:00 +02:00
solusipse
c23aee0900 Merge pull request #2 from hmage/master
Fix segfaults
2013-09-17 13:35:55 -07:00
Eugene Bujak
fe0fcbe1e6 Fix segfault -- buffers didn't have space for null-byte string terminator. 2013-09-17 21:31:28 +04:00
Eugene Bujak
b302b6e1d9 Add output binary to .gitignore 2013-09-17 21:31:17 +04:00
Eugene Bujak
5dc293e241 Add newlines at end of file. 2013-09-17 21:06:20 +04:00
solusipse
cb774abf27 changed default timeout value 2013-09-17 01:28:36 +02:00
solusipse
6ee6fa3100 fixing hostname error problem 2013-09-16 22:49:39 +02:00
solusipse
8b553306f0 minor fix 2013-09-16 15:07:31 +02:00
solusipse
7b48aed402 changed error policy when obtaining ip and hostname 2013-09-16 13:37:44 +02:00
solusipse
c1e3711742 added details to error messages 2013-09-16 10:53:32 +02:00