From: David Levine Date: Sat, 17 Mar 2012 02:02:57 +0000 (-0500) Subject: Removed some unused code having to do with permissions of symlinks. X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=9e2dbb033282c4b408061ed1d1da9c88f87d0cfe;p=mmh Removed some unused code having to do with permissions of symlinks. --- diff --git a/uip/mhparam.c b/uip/mhparam.c index 4dcdc38..90d17fa 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -16,7 +16,6 @@ extern char *mhlibdir; extern char *mhetcdir; char *sbackup = BACKUP_PREFIX; -char *slink = LINK; static struct swit switches[] = { #define COMPSW 0 @@ -68,7 +67,6 @@ static struct proc procs [] = { { "etcdir", &mhetcdir }, { "libdir", &mhlibdir }, { "sbackup", &sbackup }, - { "link", &slink }, { NULL, NULL }, }; diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index d23d141..7b63762 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -642,9 +642,6 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp, #ifdef HAVE_LSTAT int slinked = 0; -#if 0 - int oumask; /* PJS: for setting permissions on symlinks. */ -#endif #endif /* HAVE_LSTAT */ /* Was there a previous edit session? */ @@ -674,20 +671,11 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp, strncpy (linkpath, LINK, sizeof(linkpath)); else snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, LINK); - } - if (altmsg) { unlink (linkpath); #ifdef HAVE_LSTAT if (link (altpath, linkpath) == NOTOK) { -#if 0 - /* I don't think permission on symlinks matters /JLR */ - oumask = umask(0044); /* PJS: else symlinks are world 'r' */ -#endif symlink (altpath, linkpath); -#if 0 - umask(oumask); /* PJS: else symlinks are world 'r' */ -#endif slinked = 1; } else { slinked = 0;