Compare commits

..

No commits in common. "8764f006557e3b380ce2e75df3bc7b8b4a48f4fd" and "8c30d271df21ac4a917b8db82f4b6a42b6ab2b8e" have entirely different histories.

4 changed files with 4 additions and 6 deletions

2
bin.c
View file

@ -91,7 +91,7 @@ int write_paste(char *paste, unsigned long paste_size, char *id)
return -1; return -1;
/* write the content to file */ /* write the content to file */
if (fwrite(paste, sizeof(char), paste_size, file) != paste_size) { if (fwrite(paste, paste_size, sizeof(char), file) == -1) {
fclose(file); fclose(file);
return -1; return -1;
} }

View file

@ -1,5 +1,5 @@
# feuille version # feuille version
VERSION = 1.19.3 VERSION = 1.19.0
# paths (customize them to fit your system) # paths (customize them to fit your system)
PREFIX = /usr/local PREFIX = /usr/local

View file

@ -14,7 +14,7 @@
. ftr VB CB . ftr VB CB
. ftr VBI CBI . ftr VBI CBI
.\} .\}
.TH "feuille" "1" "November 2022" "feuille 1.19.3" "" .TH "feuille" "1" "November 2022" "feuille 1.19.0" ""
.hy .hy
.SH NAME .SH NAME
.PP .PP

View file

@ -326,8 +326,7 @@ int main(int argc, char *argv[])
chdir(path); chdir(path);
/* user checks */ /* user checks */
uid_t uid = 0; int uid, gid;
gid_t gid = 0;
if (getuid() == 0) { if (getuid() == 0) {
if (strlen(settings.user) == 0) if (strlen(settings.user) == 0)
settings.user = "nobody"; settings.user = "nobody";
@ -340,7 +339,6 @@ int main(int argc, char *argv[])
uid = user->pw_uid; uid = user->pw_uid;
gid = user->pw_gid; gid = user->pw_gid;
} else { } else {
puts(""); puts("");
syslog(LOG_WARNING, "running as non-root user."); syslog(LOG_WARNING, "running as non-root user.");