commit 901f84cf2a4a14fd00a0b27c4d2d8c732310e340
parent da2fdd46769f76c57f679c7542ad8aa062902a5d
Author: ukai <ukai>
Date: Tue, 5 Nov 2002 17:54:38 +0000
[w3m-dev 03374] disable_secret_security_check
* etc.c (openSecurityFile): disable_secret_security_check
* fm.h (disable_secret_security_check): added
* rc.c (CMT_DISABLE_SECRET_SECURITY_CHECK): added
(disable_secret_security_check): added
* NEWS: rc: disable_secret_security_check
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat:
5 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,5 +1,14 @@
2002-11-06 Fumitoshi UKAI <ukai@debian.or.jp>
+ * [w3m-dev 03374] disable_secret_security_check
+ * etc.c (openSecurityFile): disable_secret_security_check
+ * fm.h (disable_secret_security_check): added
+ * rc.c (CMT_DISABLE_SECRET_SECURITY_CHECK): added
+ (disable_secret_security_check): added
+ * NEWS: rc: disable_secret_security_check
+
+2002-11-06 Fumitoshi UKAI <ukai@debian.or.jp>
+
* NEWS: update
2002-11-06 Fumitoshi UKAI <ukai@debian.or.jp>
diff --git a/NEWS b/NEWS
@@ -1,5 +1,6 @@
w3m 0.3.3 or 0.4?
+* rc: disable_secret_security_check (for windows?)
* tab browsing
* rc: open_tab_blank, close_tab_back
* func: CLOSE_TAB, NEW_TAB, NEXT_TAB, PREV_TAB,
diff --git a/etc.c b/etc.c
@@ -1047,8 +1047,16 @@ openSecretFile(char *fname)
/* check permissions, if group or others readable or writable,
* refuse it, because it's insecure.
+ *
+ * XXX: disable_secret_security_check will introduce some
+ * security issues, but on some platform such as Windows
+ * it's not possible (or feasible) to disable group|other
+ * readable and writable.
+ * [w3m-dev 03368][w3m-dev 03369][w3m-dev 03370]
*/
- if ((st.st_mode & (S_IRWXG | S_IRWXO)) != 0) {
+ if (disable_secret_security_check)
+ /* do nothing */ ;
+ else if ((st.st_mode & (S_IRWXG | S_IRWXO)) != 0) {
if (fmInitialized) {
message(Sprintf(FILE_IS_READABLE_MSG, fname)->ptr, 0, 0);
refresh();
diff --git a/fm.h b/fm.h
@@ -863,6 +863,7 @@ global char *ExtBrowser init(DEF_EXT_BROWSER);
global char *ExtBrowser2 init(NULL);
global char *ExtBrowser3 init(NULL);
global int BackgroundExtViewer init(TRUE);
+global int disable_secret_security_check init(FALSE);
global char *passwd_file init(PASSWD_FILE);
global char *pre_form_file init(PRE_FORM_FILE);
global char *ftppasswd init(NULL);
diff --git a/rc.c b/rc.c
@@ -130,6 +130,7 @@ static char *config_file = NULL;
#define CMT_EXTBRZ "外部ブラウザ"
#define CMT_EXTBRZ2 "外部ブラウザその2"
#define CMT_EXTBRZ3 "外部ブラウザその3"
+#define CMT_DISABLE_SECRET_SECURITY_CHECK "パスワードファイルのパーミッションをチェックしない"
#define CMT_PASSWDFILE "パスワードファイル"
#define CMT_FTPPASS "FTPのパスワード(普通は自分のmail addressを使う)"
#ifdef FTPPASS_HOSTNAMEGEN
@@ -275,6 +276,7 @@ static char *config_file = NULL;
#define CMT_EXTBRZ "External Browser"
#define CMT_EXTBRZ2 "Second External Browser"
#define CMT_EXTBRZ3 "Third External Browser"
+#define CMT_DISABLE_SECRET_SECURITY_CHECK "Disable secret file security check"
#define CMT_PASSWDFILE "Password file"
#define CMT_FTPPASS "Password for anonymous FTP (your mail address)"
#ifdef FTPPASS_HOSTNAMEGEN
@@ -488,7 +490,7 @@ struct param_ptr params1[] = {
{"multicol", P_INT, PI_ONOFF, (void *)&multicolList, CMT_MULTICOL, NULL},
{"alt_entity", P_CHARINT, PI_ONOFF, (void *)&UseAltEntity, CMT_ALT_ENTITY,
NULL},
- {"pre_form_file", P_STRING, PI_TEXT, (void *)&pre_form_file,
+ {"pre_form_file", P_STRING, PI_TEXT, (void *)&pre_form_file,
CMT_PRE_FORM_FILE, NULL},
{"fold_textarea", P_CHARINT, PI_ONOFF, (void *)&FoldTextarea,
CMT_FOLD_TEXTAREA, NULL},
@@ -684,6 +686,9 @@ struct param_ptr params8[] = {
struct param_ptr params9[] = {
{"passwd_file", P_STRING, PI_TEXT, (void *)&passwd_file, CMT_PASSWDFILE,
NULL},
+ {"disable_secret_security_check", P_INT, PI_ONOFF,
+ (void *)&disable_secret_security_check, CMT_DISABLE_SECRET_SECURITY_CHECK,
+ NULL},
{"ftppasswd", P_STRING, PI_TEXT, (void *)&ftppasswd, CMT_FTPPASS, NULL},
#ifdef FTPPASS_HOSTNAMEGEN
{"ftppass_hostnamegen", P_INT, PI_ONOFF, (void *)&ftppass_hostnamegen,