--- doc/file.man.orig 2008-12-09 21:14:28.000000000 -0800 +++ doc/file.man 2008-12-09 21:14:50.000000000 -0800 @@ -101,11 +101,7 @@ .Pa __MAGIC__.mgc , or the files in the directory .Pa __MAGIC__ -if the compiled file does not exist. In addition, if -.Pa $HOME/.magic.mgc -or -.Pa $HOME/.magic -exists, it will be used in preference to the system magic files. +if the compiled file does not exist. .Pp If a file does not match any of the entries in the magic file, it is examined to see if it seems to be a text file. @@ -324,10 +320,6 @@ The environment variable .Dv MAGIC can be used to set the default magic file name. -If that variable is set, then -.Nm -will not attempt to open -.Pa $HOME/.magic . .Nm adds .Sq .mgc --- src/file.c.orig 2008-12-09 21:13:01.000000000 -0800 +++ src/file.c 2008-12-09 21:13:40.000000000 -0800 @@ -101,7 +101,6 @@ private const char *default_magicfile = MAGIC; private const char *separator = ":"; /* Default field separator */ -private const char hmagic[] = "/.magic"; private const struct option long_options[] = { #define OPT(shortname, longname, opt, doc) \ {longname, opt, NULL, shortname}, @@ -153,7 +152,7 @@ size_t i; int action = 0, didsomefiles = 0, errflg = 0; int flags = 0, e = 0; - char *home, *usermagic; + char *usermagic; struct magic_set *magic = NULL; char magicpath[2 * MAXPATHLEN + 2]; int longindex; @@ -178,16 +177,6 @@ magicfile = default_magicfile; if ((usermagic = getenv("MAGIC")) != NULL) magicfile = usermagic; - else - if ((home = getenv("HOME")) != NULL) { - (void)snprintf(magicpath, sizeof(magicpath), "%s%s", - home, hmagic); - if (access(magicpath, R_OK) == 0) { - (void)snprintf(magicpath, sizeof(magicpath), - "%s%s:%s", home, hmagic, magicfile); - magicfile = magicpath; - } - } #ifdef S_IFLNK flags |= (unix03 || getenv("POSIXLY_CORRECT")) ? (MAGIC_SYMLINK) : 0;