Merged ritt/elog into master

This commit is contained in:
Jason Gochanour 2016-05-26 11:34:48 -06:00
commit 3866338848
9 changed files with 127 additions and 78 deletions

View File

@ -2,7 +2,7 @@
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc. Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.

View File

@ -116,8 +116,8 @@ endif
all: $(EXECS) all: $(EXECS)
# put current GIT revision into header file to be included by programs # put current GIT revision into header file to be included by programs
$(GIT_REVISION): src/elogd.c $(GIT_REVISION): src/elogd.c src/elog.c
echo \#define GIT_REVISION \"`git log -n 1 --pretty=format:"%ad - %h"`\" > $(GIT_REVISION) type git &> /dev/null; if [ $$? -eq 1 ]; then REV="unknown" ;else REV=`git log -n 1 --pretty=format:"%ad - %h"`; fi; echo \#define GIT_REVISION \"$$REV\" > $(GIT_REVISION)
regex.o: src/regex.c src/regex.h regex.o: src/regex.c src/regex.h
$(CC) $(CFLAGS) -w -c -o regex.o src/regex.c $(CC) $(CFLAGS) -w -c -o regex.o src/regex.c
@ -137,7 +137,7 @@ strlcpy.o: src/strlcpy.c src/strlcpy.h
elogd: src/elogd.c regex.o crypt.o auth.o mxml.o $(GIT_REVISION) elogd: src/elogd.c regex.o crypt.o auth.o mxml.o $(GIT_REVISION)
$(CC) $(CFLAGS) -o elogd src/elogd.c crypt.o auth.o regex.o mxml.o $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o elogd src/elogd.c crypt.o auth.o regex.o mxml.o $(OBJS) $(LIBS)
elog: src/elog.c crypt.o $(OBJS) elog: src/elog.c crypt.o $(OBJS) $(GIT_REVISION)
$(CC) $(CFLAGS) -o elog src/elog.c crypt.o $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o elog src/elog.c crypt.o $(OBJS) $(LIBS)
debug: src/elogd.c regex.o crypt.o auth.o mxml.o debug: src/elogd.c regex.o crypt.o auth.o mxml.o

73
resources/eloglang.french Executable file → Normal file
View File

@ -1,9 +1,8 @@
# #
# French translation by Fred Pacquier <fredp@dial.oleane.com> # French translation by Fred Pacquier <fredp@dial.oleane.com>
# (for 2.9.1+) # (for 3.1.1+)
# A more recent version may be available at : # A more recent version may be available at :
# http://savannah.psi.ch/viewcvs/trunk/resources/eloglang.french?root=elog # https://bitbucket.org/ritt/elog/src/b4d2a375a1c1991daa94427455f57665f7497df0/resources/eloglang.french?at=master&fileviewer=file-view-default
#
New = Créer New = Créer
Edit = Modifier Edit = Modifier
@ -324,19 +323,19 @@ Preview = Pr
FONT = POLICE FONT = POLICE
SIZE = TAILLE SIZE = TAILLE
COLOR = COULEUR COLOR = COULEUR
astonished = astonished = surpris
smiling = smiling = souriant
happy = happy = heureux
winking = winking = clin d'oeuil
big grin = big grin = grand sourire
crying = crying = plure
cool = cool = tranquille
frowning = frowning = fronce les sourcils
confused = confused = perdu
mad = mad = furieux
pleased = pleased = content
tongue = tongue = tire la langue
yawn = yawn = baille
Encoding = Encodage Encoding = Encodage
User "%s" not found in password file = Utilisateur "%s" non trouvé dans le fichier des comptes User "%s" not found in password file = Utilisateur "%s" non trouvé dans le fichier des comptes
Cannot write to file <b>%s</b> = Impossible d'écrire dans le fichier <b>%s</b> Cannot write to file <b>%s</b> = Impossible d'écrire dans le fichier <b>%s</b>
@ -467,26 +466,22 @@ This is an automatically generated account recovery email for host %s = Ceci est
Please click on following link to recover your account = Veuillez cliquer sur le lien suivant pour récupérer votre compte Please click on following link to recover your account = Veuillez cliquer sur le lien suivant pour récupérer votre compte
Email address "%s" not registered = L'adresse mail "%s" n'est pas enregistrée Email address "%s" not registered = L'adresse mail "%s" n'est pas enregistrée
User name "%s" not registered = Le nom d'utilisateur "%s" n'est pas enregistré User name "%s" not registered = Le nom d'utilisateur "%s" n'est pas enregistré
Error accessing password file = Problème d'accès au fichier des mots de passe
# CSV (";" separated) + Text = CSV (séparateur ";") + Texte
#---- please translate following items and then remove this comment ----# Entry can only be deleted %1.2lg hours after creation = Une entrée ne peut être supprimée que %1.2lg heures après sa création
# Drop attachments here... = Glisser les attachements ici...
Error accessing password file = Insert Timestamp = Insérer horodatage
CSV (";" separated) + Text = Pending draft available = Brouillon en attente disponible
Entry can only be deleted %1.2lg hours after creation = %d pending drafts available = %d brouillons en attente disponibles
Drop attachments here... = Create new entry = Créer une nouvelle entrée
Insert Timestamp = If you leave this page you will lose your unsaved changes = Si vous quittez cette page vos modifications non enregistrées seront perdues
Pending draft available = Edited = Modifié
%d pending drafts available = All time = Tous temps
Create new entry = Draft = Brouillon
If you leave this page you will lose your unsaved changes = Restrict seach to last = Restreindre la recherche aux
Edited = days = derniers jours
All time = Draft saved at = Brouillon enregistré le
Draft = You might however then overwrite each other's modifications = Vous pourriez toutefois écraser mutuellement vos modifications
Restrict seach to last = Draft entry created on %s by %s = Brouillon créé le %s par %s
days = Really delete this entry? = Supprimer cette entrée, vraiment ?
Draft saved at = This is a draft message, edit and submit it to make it permanent = Ceci est un brouillon, modifiez-le et validez-le pour le rendre définitif
You might however then overwrite each other's modifications =
Draft entry created on %s by %s =
Really delete this entry? =
This is a draft message, edit and submit it to make it permanent =

View File

@ -1,4 +1,4 @@
/** /**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license * For licensing, see LICENSE.html or http://ckeditor.com/license
*/ */

View File

@ -470,6 +470,13 @@ int auth_verify_password(LOGBOOK * lbs, const char *user, const char *password,
error_str[0] = 0; error_str[0] = 0;
verified = FALSE; verified = FALSE;
/* otherwise calls with null lbs which make this procedure crash */
if (lbs == NULL)
lbs = get_first_lbs_with_global_passwd();
if (lbs == NULL)
return FALSE;
getcfg(lbs->name, "Authentication", str, sizeof(str)); getcfg(lbs->name, "Authentication", str, sizeof(str));
#ifdef HAVE_KRB5 #ifdef HAVE_KRB5

View File

@ -20,12 +20,12 @@
Contents: Electronic logbook utility Contents: Electronic logbook utility
$Id$
\********************************************************************/ \********************************************************************/
#include "elog-version.h" #include "elog-version.h"
char svn_revision[] = "$Id$"; #include "git-revision.h"
const char *_git_revision = GIT_REVISION;
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
@ -73,6 +73,17 @@ char text[TEXT_SIZE], old_text[TEXT_SIZE], new_text[TEXT_SIZE];
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
const char *git_revision()
{
const char *p = _git_revision;
if (strrchr(p, '-'))
p = strrchr(p, '-')+2;
return p;
}
/*------------------------------------------------------------------*/
char *map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; char *map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
void base64_encode(unsigned char *s, unsigned char *d, int size) void base64_encode(unsigned char *s, unsigned char *d, int size)
@ -1051,10 +1062,7 @@ int main(int argc, char *argv[])
} else { } else {
usage: usage:
printf("%s ", ELOGID); printf("%s ", ELOGID);
strcpy(str, svn_revision + 13); printf("revision %s\n", git_revision());
if (strchr(str, ' '))
*strchr(str, ' ') = 0;
printf("revision %s\n", str);
printf("\nusage: elog\n"); printf("\nusage: elog\n");
printf("elog -h <hostname> [-p port] [-d subdir]\n"); printf("elog -h <hostname> [-p port] [-d subdir]\n");
printf(" Location where elogd is running\n"); printf(" Location where elogd is running\n");

View File

@ -1718,12 +1718,14 @@ int setegroup(char *str)
gr = getgrnam(str); gr = getgrnam(str);
if (gr != NULL) if (gr != NULL) {
chown(logbook_dir, -1, gr->gr_gid);
if (setregid(-1, gr->gr_gid) >= 0 && initgroups(gr->gr_name, gr->gr_gid) >= 0) if (setregid(-1, gr->gr_gid) >= 0 && initgroups(gr->gr_name, gr->gr_gid) >= 0)
return 0; return 0;
else { else {
eprintf("Cannot set effective GID to group \"%s\"\n", gr->gr_name); eprintf("Cannot set effective GID to group \"%s\"\n", gr->gr_name);
eprintf("setgroup: %s\n", strerror(errno)); eprintf("setgroup: %s\n", strerror(errno));
}
} else } else
eprintf("Group \"%s\" not found\n", str); eprintf("Group \"%s\" not found\n", str);
@ -1741,12 +1743,14 @@ int seteuser(char *str)
pw = getpwnam(str); pw = getpwnam(str);
if (pw != NULL) if (pw != NULL) {
chown(logbook_dir, pw->pw_uid, -1);
if (setreuid(-1, pw->pw_uid) >= 0) { if (setreuid(-1, pw->pw_uid) >= 0) {
return 0; return 0;
} else { } else {
eprintf("Cannot set effective UID to user \"%s\"\n", str); eprintf("Cannot set effective UID to user \"%s\"\n", str);
eprintf("setuser: %s\n", strerror(errno)); eprintf("setuser: %s\n", strerror(errno));
}
} else } else
eprintf("User \"%s\" not found\n", str); eprintf("User \"%s\" not found\n", str);
@ -8902,7 +8906,12 @@ void show_change_pwd_page(LOGBOOK * lbs)
{ {
char str[256], config[256], old_pwd[256], new_pwd[256], new_pwd2[256], user[256], auth[32], error_str[256]; char str[256], config[256], old_pwd[256], new_pwd[256], new_pwd2[256], user[256], auth[32], error_str[256];
int wrong_pwd; int wrong_pwd;
/* otherwise calls with null lbs which make this procedure crash */
if (lbs == NULL)
lbs = get_first_lbs_with_global_passwd();
if (lbs == NULL)
return;
getcfg(lbs->name, "Authentication", auth, sizeof(auth)); getcfg(lbs->name, "Authentication", auth, sizeof(auth));
old_pwd[0] = new_pwd[0] = new_pwd2[0] = 0; old_pwd[0] = new_pwd[0] = new_pwd2[0] = 0;
@ -10490,7 +10499,8 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
/*---- add password in case cookie expires during edit ----*/ /*---- add password in case cookie expires during edit ----*/
if (getcfg(lbs->name, "Password file", str, sizeof(str)) && isparam("unm")) { if (getcfg(lbs->name, "Password file", str, sizeof(str)) && isparam("unm")) {
rsprintf("<input type=hidden name=\"unm\" value=\"%s\">\n", getparam("unm")); strencode2(str, getparam("unm"), sizeof(str));
rsprintf("<input type=hidden name=\"unm\" value=\"%s\">\n", str);
if (isparam("upwd")) if (isparam("upwd"))
strlcpy(upwd, getparam("upwd"), sizeof(upwd)); strlcpy(upwd, getparam("upwd"), sizeof(upwd));
else else
@ -10577,7 +10587,9 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
rsprintf("<tr><td nowrap width=\"10%%\" class=\"attribname\">%s:</td>", loc("Entry time")); rsprintf("<tr><td nowrap width=\"10%%\" class=\"attribname\">%s:</td>", loc("Entry time"));
rsprintf("<td class=\"attribvalue\">%s\n", str); rsprintf("<td class=\"attribvalue\">%s\n", str);
rsprintf("<input type=hidden name=entry_date value=\"%s\"></td></tr>\n", date);
strencode2(str, date, sizeof(str));
rsprintf("<input type=hidden name=entry_date value=\"%s\"></td></tr>\n", str);
} }
if (_condition[0]) if (_condition[0])
@ -11839,7 +11851,8 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
thumb_ref[0] = 0; thumb_ref[0] = 0;
if (strlen(att[index]) < 14 || att[index][6] != '_' || att[index][13] != '_') { if (strlen(att[index]) < 14 || att[index][6] != '_' || att[index][13] != '_') {
rsprintf("<b>Error: Invalid attachment \"%s\"</b><br>", att); strencode2(str, att[index], sizeof(str));
rsprintf("<b>Error: Invalid attachment \"%s\"</b><br>", str);
} else { } else {
strlcpy(file_name, lbs->data_dir, sizeof(file_name)); strlcpy(file_name, lbs->data_dir, sizeof(file_name));
@ -11889,7 +11902,8 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
rsprintf("&nbsp;&nbsp;\n"); rsprintf("&nbsp;&nbsp;\n");
/* ImageMagick available, so get image size */ /* ImageMagick available, so get image size */
rsprintf("<b>%s</b>&nbsp;\n", att[index] + 14); strencode2(str, att[index], sizeof(str));
rsprintf("<b>%s</b>&nbsp;\n", str + 14);
if (chkext(file_name, ".pdf") || chkext(file_name, ".ps")) if (chkext(file_name, ".pdf") || chkext(file_name, ".ps"))
sprintf(cmd, "%s -format '%%wx%%h' '%s[0]'", _identify_cmd, file_name); sprintf(cmd, "%s -format '%%wx%%h' '%s[0]'", _identify_cmd, file_name);
else else
@ -12006,10 +12020,11 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
rsprintf("</td></tr></table>\n"); rsprintf("</td></tr></table>\n");
} }
strencode2(str, att[index], sizeof(str));
if (thumb_ref[0]) if (thumb_ref[0])
rsprintf("<input type=hidden name=\"attachment%d\" alt=\"%s\" value=\"%s\">\n", index, thumb_ref, att[index]); rsprintf("<input type=hidden name=\"attachment%d\" alt=\"%s\" value=\"%s\">\n", index, thumb_ref, str);
else else
rsprintf("<input type=hidden name=\"attachment%d\" value=\"%s\">\n", index, att[index]); rsprintf("<input type=hidden name=\"attachment%d\" value=\"%s\">\n", index, str);
rsprintf("</td></tr>\n"); rsprintf("</td></tr>\n");
} else } else
@ -13739,7 +13754,8 @@ void show_config_page(LOGBOOK * lbs)
rsprintf("<!--\n\n"); rsprintf("<!--\n\n");
rsprintf("function chkrem()\n"); rsprintf("function chkrem()\n");
rsprintf("{\n"); rsprintf("{\n");
sprintf(str, loc("Really remove user %s?"), user); strencode2(str, user, sizeof(str));
sprintf(str, loc("Really remove user %s?"), str);
rsprintf(" var subm = confirm(\"%s\");\n", str); rsprintf(" var subm = confirm(\"%s\");\n", str);
rsprintf(" return subm;\n"); rsprintf(" return subm;\n");
rsprintf("}\n\n"); rsprintf("}\n\n");
@ -13772,7 +13788,8 @@ void show_config_page(LOGBOOK * lbs)
rsprintf("<input type=hidden name=cmd value=\"%s\">\n", loc("Config")); // for select javascript rsprintf("<input type=hidden name=cmd value=\"%s\">\n", loc("Config")); // for select javascript
rsprintf("<input type=submit name=cmd value=\"%s\">\n", loc("Save")); rsprintf("<input type=submit name=cmd value=\"%s\">\n", loc("Save"));
rsprintf("<input type=submit name=cmd value=\"%s\">\n", loc("Back")); rsprintf("<input type=submit name=cmd value=\"%s\">\n", loc("Back"));
rsprintf("<input type=hidden name=config value=\"%s\">\n", user); strencode2(str, user, sizeof(str));
rsprintf("<input type=hidden name=config value=\"%s\">\n", str);
rsprintf("<input type=hidden name=cfgpage value=\"1\">\n"); // needed for "Save" command rsprintf("<input type=hidden name=cfgpage value=\"1\">\n"); // needed for "Save" command
rsprintf("</span></td></tr>\n\n"); rsprintf("</span></td></tr>\n\n");
@ -13807,10 +13824,14 @@ void show_config_page(LOGBOOK * lbs)
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
get_user_line(lbs, user_list[i], NULL, full_name, user_email, NULL, NULL, NULL); get_user_line(lbs, user_list[i], NULL, full_name, user_email, NULL, NULL, NULL);
if (strcmp(user_list[i], user) == 0) if (strcmp(user_list[i], user) == 0) {
rsprintf("<option selected value=\"%s\">%s &lt;%s&gt;\n", user_list[i], user_list[i], user_email); strencode2(str, user_list[i], sizeof(str));
else rsprintf("<option selected value=\"%s\">%s &lt;%s&gt;\n", str, str, user_email);
rsprintf("<option value=\"%s\">%s &lt;%s&gt;\n", user_list[i], user_list[i], user_email); }
else {
strencode2(str, user_list[i], sizeof(str));
rsprintf("<option selected value=\"%s\">%s &lt;%s&gt;\n", str, str, user_email);
}
} }
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
@ -13849,6 +13870,8 @@ void show_config_page(LOGBOOK * lbs)
rsprintf("<tr><td nowrap width=\"15%%\">%s:</td>\n", loc("Login name")); rsprintf("<tr><td nowrap width=\"15%%\">%s:</td>\n", loc("Login name"));
getcfg(lbs->name, "Authentication", auth, sizeof(auth)); getcfg(lbs->name, "Authentication", auth, sizeof(auth));
strencode2(str, user, sizeof(str));
if (stristr(auth, "Kerberos") || stristr(auth, "Webserver")) if (stristr(auth, "Kerberos") || stristr(auth, "Webserver"))
rsprintf("<td><input type=text size=40 name=new_user_name value=\"%s\" readonly></td></tr>\n", str); rsprintf("<td><input type=text size=40 name=new_user_name value=\"%s\" readonly></td></tr>\n", str);
else else
@ -14114,7 +14137,9 @@ void show_forgot_pwd_page(LOGBOOK * lbs)
url_slash_encode(pwd, sizeof(pwd)); url_slash_encode(pwd, sizeof(pwd));
sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd); sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
url_encode(redir, sizeof(redir)); url_encode(redir, sizeof(redir));
sprintf(str, "?redir=%s&uname=%s&upassword=%s", redir, login_name, pwd);
strencode2(str2, redir, sizeof(str2));
sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
strlcat(url, str, sizeof(url)); strlcat(url, str, sizeof(url));
retrieve_email_from(lbs, mail_from, mail_from_name, NULL); retrieve_email_from(lbs, mail_from, mail_from_name, NULL);
@ -14235,7 +14260,8 @@ void show_new_user_page(LOGBOOK * lbs, char *user)
rsprintf("<tr><td nowrap>%s:</td>\n", loc("Login name")); rsprintf("<tr><td nowrap>%s:</td>\n", loc("Login name"));
if (user && user[0]) { if (user && user[0]) {
rsprintf("<td><input type=text size=40 name=new_user_name value=\"%s\" readonly></td>\n", user); strencode2(str, user, sizeof(str));
rsprintf("<td><input type=text size=40 name=new_user_name value=\"%s\" readonly></td>\n", str);
rsprintf("<td>&nbsp;</td>\n"); rsprintf("<td>&nbsp;</td>\n");
} else { } else {
rsprintf("<td><input type=text size=40 name=new_user_name></td>\n"); rsprintf("<td><input type=text size=40 name=new_user_name></td>\n");
@ -22563,7 +22589,7 @@ int execute_shell(LOGBOOK * lbs, int message_id, char attrib[MAX_N_ATTR][NAME_LE
p = stristr(shell_cmd, "$attachments"); p = stristr(shell_cmd, "$attachments");
strlcpy(tail, p + strlen("$attachments"), sizeof(tail)); strlcpy(tail, p + strlen("$attachments"), sizeof(tail));
*p = 0; *p = 0;
for (i = 0; i < MAX_ATTACHMENTS; i++) for (i = 0; i < MAX_ATTACHMENTS; i++) {
generate_subdir_name(att_file[i], subdir, sizeof(subdir)); generate_subdir_name(att_file[i], subdir, sizeof(subdir));
if (att_file[i][0] && strlen(shell_cmd) + strlen(lbs->data_dir) + strlen(subdir) + strlen(att_file[i]) if (att_file[i][0] && strlen(shell_cmd) + strlen(lbs->data_dir) + strlen(subdir) + strlen(att_file[i])
< sizeof(shell_cmd) + 1) { < sizeof(shell_cmd) + 1) {
@ -22576,6 +22602,7 @@ int execute_shell(LOGBOOK * lbs, int message_id, char attrib[MAX_N_ATTR][NAME_LE
strcat(p, "\" "); strcat(p, "\" ");
p += strlen(p); p += strlen(p);
} }
}
strlcat(shell_cmd, tail, sizeof(shell_cmd)); strlcat(shell_cmd, tail, sizeof(shell_cmd));
} }
@ -24143,7 +24170,7 @@ int get_thumb_name(const char *file_name, char *thumb_name, int size, int index)
void call_image_magick(LOGBOOK * lbs) void call_image_magick(LOGBOOK * lbs)
{ {
char str[256], cmd[256], file_name[256], thumb_name[256], subdir[256]; char str[1024], cmd[1024], file_name[256], thumb_name[256], subdir[256];
int cur_width, cur_height, new_size, cur_rot, new_rot, thumb_status; int cur_width, cur_height, new_size, cur_rot, new_rot, thumb_status;
if (!isparam("req") || !isparam("img")) { if (!isparam("req") || !isparam("img")) {
@ -26109,6 +26136,9 @@ void show_login_page(LOGBOOK * lbs, char *redir, int fail)
strlcpy(str, redir, sizeof(str)); strlcpy(str, redir, sizeof(str));
if (strchr(str, '<')) if (strchr(str, '<'))
url_encode(str, sizeof(str)); url_encode(str, sizeof(str));
if (strchr(str, ' '))
return;
rsprintf("<input type=hidden name=redir value=\"%s\">\n", str); rsprintf("<input type=hidden name=redir value=\"%s\">\n", str);
rsprintf("<table class=\"login_frame\" cellspacing=0 align=center>"); rsprintf("<table class=\"login_frame\" cellspacing=0 align=center>");
@ -26125,11 +26155,14 @@ void show_login_page(LOGBOOK * lbs, char *redir, int fail)
rsprintf("<tr><td class=\"dlgerror\">%s!</td></tr>\n", str); rsprintf("<tr><td class=\"dlgerror\">%s!</td></tr>\n", str);
} }
if (isparam("unm"))
strencode2(str, getparam("unm"), sizeof(str));
rsprintf("<tr><td class=\"login_form\">\n"); rsprintf("<tr><td class=\"login_form\">\n");
rsprintf("<span class=\"overlay_wrapper\">\n"); rsprintf("<span class=\"overlay_wrapper\">\n");
rsprintf("<label for=\"uname\" id=\"uname\" class=\"overlabel\">%s</label>\n", loc("Username")); rsprintf("<label for=\"uname\" id=\"uname\" class=\"overlabel\">%s</label>\n", loc("Username"));
rsprintf("<input type=\"text\" class=\"login_input\" name=\"uname\" value=\"%s\" title=\"%s\" onInput=\"document.getElementById('uname').style.display='none';\">\n", rsprintf("<input type=\"text\" class=\"login_input\" name=\"uname\" value=\"%s\" title=\"%s\" onInput=\"document.getElementById('uname').style.display='none';\">\n",
isparam("unm") ? getparam("unm") : "", loc("Username")); isparam("unm") ? str : "", loc("Username"));
rsprintf("</span></td></tr>\n"); rsprintf("</span></td></tr>\n");
rsprintf("<tr><td class=\"login_form\">\n"); rsprintf("<tr><td class=\"login_form\">\n");
@ -27373,7 +27406,7 @@ void interprete(char *lbook, char *path)
/* check if user has access to logbook */ /* check if user has access to logbook */
if (!check_login_user(lbs, getparam("uname"))) { if (!check_login_user(lbs, getparam("uname"))) {
show_error("Use has no access to this logbook"); show_error("User has no access to this logbook");
return; return;
} }
@ -29688,13 +29721,21 @@ void server_loop(void)
#ifndef HAVE_KRB5 #ifndef HAVE_KRB5
/* check for Kerberos authentication */ /* check for Kerberos authentication */
getcfg("gloabl", "Authentication", str, sizeof(str)); getcfg("global", "Authentication", str, sizeof(str));
if (stristr(str, "Kerberos")) { if (stristr(str, "Kerberos")) {
eprintf("Kerberos authentication not compiled into this version of elogd.\n"); eprintf("Kerberos authentication not compiled into this version of elogd.\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
#endif #endif
#ifndef HAVE_LDAP
/* check for Kerberos authentication */
/* NPA change */
getcfg("global", "Authentication", str, sizeof(str));
if (stristr(str, "LDAP")) {
eprintf("LDAP authentication not compiled into this version of elogd.\n");
exit(EXIT_FAILURE);
}
#endif
/* listen for connection */ /* listen for connection */
status = listen(lsock, SOMAXCONN); status = listen(lsock, SOMAXCONN);
if (status < 0) { if (status < 0) {

View File

@ -187,10 +187,7 @@
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
HAVE_SSL,
DEBUG,
);
GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
OTHER_LDFLAGS = "-lssl"; OTHER_LDFLAGS = "-lssl";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";

View File

@ -153,7 +153,7 @@
D52BA2F113999DB0000458E3 /* Project object */ = { D52BA2F113999DB0000458E3 /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 0630; LastUpgradeCheck = 0720;
ORGANIZATIONNAME = PSI; ORGANIZATIONNAME = PSI;
}; };
buildConfigurationList = D52BA2F413999DB0000458E3 /* Build configuration list for PBXProject "elogd" */; buildConfigurationList = D52BA2F413999DB0000458E3 /* Build configuration list for PBXProject "elogd" */;
@ -218,6 +218,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;