* etc.c (PASS_IS_READABLE_MSG): deleted
(FILE_IS_READABLE_MSG): added (openPasswdFile): deleted (openSecretFile): delete error_msg arg (loadPasswd): use openSecretFile() * form.c (next_token): delete unused static decl (FILE_IS_READABLE_MSG): deleted (loadPreForm): no need pass error_msg * proto.h (openSecretFile): delete error_msg arg From: Fumitoshi UKAI <ukai@debian.or.jp>
This commit is contained in:
@@ -1,3 +1,15 @@
|
|||||||
|
2002-11-06 Fumitoshi UKAI <ukai@debian.or.jp>
|
||||||
|
|
||||||
|
* etc.c (PASS_IS_READABLE_MSG): deleted
|
||||||
|
(FILE_IS_READABLE_MSG): added
|
||||||
|
(openPasswdFile): deleted
|
||||||
|
(openSecretFile): delete error_msg arg
|
||||||
|
(loadPasswd): use openSecretFile()
|
||||||
|
* form.c (next_token): delete unused static decl
|
||||||
|
(FILE_IS_READABLE_MSG): deleted
|
||||||
|
(loadPreForm): no need pass error_msg
|
||||||
|
* proto.h (openSecretFile): delete error_msg arg
|
||||||
|
|
||||||
2002-11-06 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
2002-11-06 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
||||||
|
|
||||||
* [w3m-dev 03373] setting form on loading
|
* [w3m-dev 03373] setting form on loading
|
||||||
@@ -4142,4 +4154,4 @@ a * [w3m-dev 03276] compile error on EWS4800
|
|||||||
* release-0-2-1
|
* release-0-2-1
|
||||||
* import w3m-0.2.1
|
* import w3m-0.2.1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.470 2002/11/05 15:56:11 ukai Exp $
|
$Id: ChangeLog,v 1.471 2002/11/05 16:03:12 ukai Exp $
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: etc.c,v 1.29 2002/11/05 15:56:12 ukai Exp $ */
|
/* $Id: etc.c,v 1.30 2002/11/05 16:03:13 ukai Exp $ */
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include "myctype.h"
|
#include "myctype.h"
|
||||||
@@ -1033,11 +1033,10 @@ parsePasswd(FILE * fp, int netrc)
|
|||||||
add_auth_pass_entry(&ent, netrc);
|
add_auth_pass_entry(&ent, netrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PASS_IS_READABLE_MSG "SECURITY NOTE: passwd file must not be accessible by others"
|
#define FILE_IS_READABLE_MSG "SECURITY NOTE: file %s must not be accessible by others"
|
||||||
#define openPasswdFile(fname) openSecretFile(fname, PASS_IS_READABLE_MSG)
|
|
||||||
|
|
||||||
FILE *
|
FILE *
|
||||||
openSecretFile(char *fname, char *error_msg)
|
openSecretFile(char *fname)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (fname == NULL)
|
if (fname == NULL)
|
||||||
@@ -1050,11 +1049,11 @@ openSecretFile(char *fname, char *error_msg)
|
|||||||
*/
|
*/
|
||||||
if ((st.st_mode & (S_IRWXG | S_IRWXO)) != 0) {
|
if ((st.st_mode & (S_IRWXG | S_IRWXO)) != 0) {
|
||||||
if (fmInitialized) {
|
if (fmInitialized) {
|
||||||
message(error_msg, 0, 0);
|
message(Sprintf(FILE_IS_READABLE_MSG, fname)->ptr, 0, 0);
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fputs(error_msg, stderr);
|
fputs(Sprintf(FILE_IS_READABLE_MSG, fname)->ptr, stderr);
|
||||||
fputc('\n', stderr);
|
fputc('\n', stderr);
|
||||||
}
|
}
|
||||||
sleep(2);
|
sleep(2);
|
||||||
@@ -1068,14 +1067,14 @@ void
|
|||||||
loadPasswd(void)
|
loadPasswd(void)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
fp = openPasswdFile(passwd_file);
|
fp = openSecretFile(passwd_file);
|
||||||
if (fp != NULL) {
|
if (fp != NULL) {
|
||||||
parsePasswd(fp, 0);
|
parsePasswd(fp, 0);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for FTP */
|
/* for FTP */
|
||||||
fp = openPasswdFile("~/.netrc");
|
fp = openSecretFile("~/.netrc");
|
||||||
if (fp != NULL) {
|
if (fp != NULL) {
|
||||||
parsePasswd(fp, 1);
|
parsePasswd(fp, 1);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: form.c,v 1.15 2002/11/05 15:56:13 ukai Exp $ */
|
/* $Id: form.c,v 1.16 2002/11/05 16:03:14 ukai Exp $ */
|
||||||
/*
|
/*
|
||||||
* HTML forms
|
* HTML forms
|
||||||
*/
|
*/
|
||||||
@@ -671,7 +671,6 @@ struct pre_form {
|
|||||||
struct pre_form *next;
|
struct pre_form *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
static Str next_token(Str arg);
|
|
||||||
static struct pre_form *PreForm = NULL;
|
static struct pre_form *PreForm = NULL;
|
||||||
|
|
||||||
static struct pre_form *
|
static struct pre_form *
|
||||||
@@ -727,8 +726,6 @@ radio <name> <value>
|
|||||||
submit [<name>]
|
submit [<name>]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FILE_IS_READABLE_MSG "SECURITY NOTE: file %s must not be accessible by others"
|
|
||||||
|
|
||||||
void
|
void
|
||||||
loadPreForm(void)
|
loadPreForm(void)
|
||||||
{
|
{
|
||||||
@@ -737,8 +734,7 @@ loadPreForm(void)
|
|||||||
struct pre_form *pf = NULL;
|
struct pre_form *pf = NULL;
|
||||||
struct pre_form_item *pi = NULL;
|
struct pre_form_item *pi = NULL;
|
||||||
|
|
||||||
fp = openSecretFile(pre_form_file, Sprintf(FILE_IS_READABLE_MSG,
|
fp = openSecretFile(pre_form_file);
|
||||||
pre_form_file)->ptr);
|
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
PreForm = NULL;
|
PreForm = NULL;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: proto.h,v 1.49 2002/11/05 15:56:14 ukai Exp $ */
|
/* $Id: proto.h,v 1.50 2002/11/05 16:03:14 ukai Exp $ */
|
||||||
/*
|
/*
|
||||||
* This file was automatically generated by version 1.7 of cextract.
|
* This file was automatically generated by version 1.7 of cextract.
|
||||||
* Manual editing not recommended.
|
* Manual editing not recommended.
|
||||||
@@ -521,7 +521,7 @@ extern Buffer *dirBuffer(char *dirname);
|
|||||||
extern void set_environ(char *var, char *value);
|
extern void set_environ(char *var, char *value);
|
||||||
extern FILE *localcgi_post(char *, char *, FormList *, char *);
|
extern FILE *localcgi_post(char *, char *, FormList *, char *);
|
||||||
extern FILE *localcgi_get(char *, char *, char *);
|
extern FILE *localcgi_get(char *, char *, char *);
|
||||||
extern FILE *openSecretFile(char *fname, char *error_msg);
|
extern FILE *openSecretFile(char *fname);
|
||||||
extern void loadPasswd(void);
|
extern void loadPasswd(void);
|
||||||
extern void loadPreForm(void);
|
extern void loadPreForm(void);
|
||||||
extern int find_auth_user_passwd(ParsedURL *pu, char *realm,
|
extern int find_auth_user_passwd(ParsedURL *pu, char *realm,
|
||||||
|
|||||||
Reference in New Issue
Block a user