Compare commits
7 commits
8c30d271df
...
8764f00655
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8764f00655 | ||
![]() |
65ecf9d81a | ||
![]() |
de702c9b58 | ||
![]() |
9f9a25237a | ||
![]() |
4b3b46e7ab | ||
![]() |
38b6f2ddc5 | ||
![]() |
c6f8f0e736 |
4 changed files with 6 additions and 4 deletions
2
bin.c
2
bin.c
|
@ -91,7 +91,7 @@ int write_paste(char *paste, unsigned long paste_size, char *id)
|
|||
return -1;
|
||||
|
||||
/* write the content to file */
|
||||
if (fwrite(paste, paste_size, sizeof(char), file) == -1) {
|
||||
if (fwrite(paste, sizeof(char), paste_size, file) != paste_size) {
|
||||
fclose(file);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# feuille version
|
||||
VERSION = 1.19.0
|
||||
VERSION = 1.19.3
|
||||
|
||||
# paths (customize them to fit your system)
|
||||
PREFIX = /usr/local
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
. ftr VB CB
|
||||
. ftr VBI CBI
|
||||
.\}
|
||||
.TH "feuille" "1" "November 2022" "feuille 1.19.0" ""
|
||||
.TH "feuille" "1" "November 2022" "feuille 1.19.3" ""
|
||||
.hy
|
||||
.SH NAME
|
||||
.PP
|
||||
|
|
|
@ -326,7 +326,8 @@ int main(int argc, char *argv[])
|
|||
chdir(path);
|
||||
|
||||
/* user checks */
|
||||
int uid, gid;
|
||||
uid_t uid = 0;
|
||||
gid_t gid = 0;
|
||||
if (getuid() == 0) {
|
||||
if (strlen(settings.user) == 0)
|
||||
settings.user = "nobody";
|
||||
|
@ -339,6 +340,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
uid = user->pw_uid;
|
||||
gid = user->pw_gid;
|
||||
|
||||
} else {
|
||||
puts("");
|
||||
syslog(LOG_WARNING, "running as non-root user.");
|
||||
|
|
Reference in a new issue