- Timestamp:
- Sep 5, 2007, 1:04:57 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_suidchk.c
r115 r119 112 112 }, 113 113 { 114 N_("suidchecknosuid"), 115 sh_suidchk_set_nosuid 116 }, 117 { 114 118 N_("suidcheckquarantinefiles"), 115 119 sh_suidchk_set_quarantine … … 134 138 static time_t ShSuidchkInterval = 7200; 135 139 static long ShSuidchkFps = 0; 140 static int ShSuidchkNosuid = S_FALSE; 136 141 static int ShSuidchkYield = S_FALSE; 137 142 static int ShSuidchkQEnable = S_FALSE; … … 954 959 0 != strncmp (_("mmfs"), fs, 4) && 955 960 0 != strncmp (_("msdos"), fs, 5) && 956 0 != strncmp (_("nfs"), fs, 3) && 957 0 != strncmp (_("nosuid"), fs, 6) && 961 0 != strncmp (_("nfs"), fs, 3) && 958 962 0 != strncmp (_("proc"), fs, 4) && 959 963 0 != strncmp (_("vfat"), fs, 4) … … 961 965 ) 962 966 { 963 /* fprintf(stderr, "%s: %s\n", fs, tmpcat); */ 964 (void) sh_suidchk_check_internal(tmpcat); 967 if ((ShSuidchkNosuid == S_TRUE) || 968 (0 != strncmp (_("nosuid"), fs, 6))) 969 /* fprintf(stderr, "%s: %s\n", fs, tmpcat); */ 970 (void) sh_suidchk_check_internal(tmpcat); 965 971 } 966 972 } … … 1374 1380 } 1375 1381 1382 int sh_suidchk_set_nosuid (const char * c) 1383 { 1384 int i; 1385 SL_ENTER(_("sh_suidchk_set_nosuid")); 1386 i = sh_util_flagval(c, &ShSuidchkNosuid); 1387 SL_RETURN(i, _("sh_suidchk_set_nosuid")); 1388 } 1389 1376 1390 int sh_suidchk_set_quarantine (const char * c) 1377 1391 { … … 1907 1921 */ 1908 1922 #ifdef HAVE_HASMNTOPT 1909 if (NULL == hasmntopt(mnt, "nosuid") )1923 if (NULL == hasmntopt(mnt, "nosuid") || (ShSuidchkNosuid == S_TRUE)) 1910 1924 type = mnt->mnt_type; 1911 1925 else … … 1985 1999 /* patch by Konstantin Khrooschev <nathoo@co.ru> 1986 2000 */ 1987 if( fss.f_flag & ST_NOSUID)2001 if( (fss.f_flag & ST_NOSUID) && (ShSuidchkNosuid == S_FALSE)) 1988 2002 type = _("nosuid"); 1989 2003 } … … 2035 2049 #ifdef MNT_VISFLAGMASK 2036 2050 flags = fss.f_flags & MNT_VISFLAGMASK; 2037 if ( flags & MNT_NOSUID)2051 if ((flags & MNT_NOSUID) && (ShSuidchkNosuid == S_FALSE)) 2038 2052 #else 2039 if ( fss.f_flags & MNT_NOSUID)2053 if ((fss.f_flags & MNT_NOSUID) && (ShSuidchkNosuid == S_FALSE)) 2040 2054 #endif 2041 2055 type = _("nosuid");
Note:
See TracChangeset
for help on using the changeset viewer.