diff options
| author | Warner Losh <imp@FreeBSD.org> | 1997-03-24 05:53:12 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 1997-03-24 05:53:12 +0000 |
| commit | 94cf2e751d9b73663268c3a6d472df58fdca9def (patch) | |
| tree | 19b4043d2103951e48e63cba8d6a5ff85fb37e54 | |
| parent | f85d627937ef643b50ffa85d2993e9408b99a76f (diff) | |
Notes
| -rw-r--r-- | sbin/mount_portal/mount_portal.c | 5 | ||||
| -rw-r--r-- | sbin/mount_portalfs/mount_portalfs.c | 5 | ||||
| -rw-r--r-- | usr.sbin/mount_portalfs/mount_portalfs.c | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/sbin/mount_portal/mount_portal.c b/sbin/mount_portal/mount_portal.c index cf77264266ab..cd8d72b58bbf 100644 --- a/sbin/mount_portal/mount_portal.c +++ b/sbin/mount_portal/mount_portal.c @@ -45,7 +45,7 @@ char copyright[] = static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95"; */ static const char rcsid[] = - "$Id: mount_portal.c,v 1.9 1997/02/22 14:32:53 peter Exp $"; + "$Id: mount_portal.c,v 1.10 1997/03/11 12:34:58 peter Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -110,6 +110,7 @@ main(argc, argv) int mntflags = 0; char tag[32]; struct vfsconf vfc; + mode_t um; qelem q; int rc; @@ -159,11 +160,13 @@ main(argc, argv) if (so < 0) { err(EX_OSERR, "socket"); } + um = umask(077); (void) unlink(un.sun_path); if (bind(so, (struct sockaddr *) &un, sizeof(un)) < 0) err(1, NULL); (void) unlink(un.sun_path); + (void) umask(um); (void) listen(so, 5); diff --git a/sbin/mount_portalfs/mount_portalfs.c b/sbin/mount_portalfs/mount_portalfs.c index cf77264266ab..cd8d72b58bbf 100644 --- a/sbin/mount_portalfs/mount_portalfs.c +++ b/sbin/mount_portalfs/mount_portalfs.c @@ -45,7 +45,7 @@ char copyright[] = static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95"; */ static const char rcsid[] = - "$Id: mount_portal.c,v 1.9 1997/02/22 14:32:53 peter Exp $"; + "$Id: mount_portal.c,v 1.10 1997/03/11 12:34:58 peter Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -110,6 +110,7 @@ main(argc, argv) int mntflags = 0; char tag[32]; struct vfsconf vfc; + mode_t um; qelem q; int rc; @@ -159,11 +160,13 @@ main(argc, argv) if (so < 0) { err(EX_OSERR, "socket"); } + um = umask(077); (void) unlink(un.sun_path); if (bind(so, (struct sockaddr *) &un, sizeof(un)) < 0) err(1, NULL); (void) unlink(un.sun_path); + (void) umask(um); (void) listen(so, 5); diff --git a/usr.sbin/mount_portalfs/mount_portalfs.c b/usr.sbin/mount_portalfs/mount_portalfs.c index cf77264266ab..cd8d72b58bbf 100644 --- a/usr.sbin/mount_portalfs/mount_portalfs.c +++ b/usr.sbin/mount_portalfs/mount_portalfs.c @@ -45,7 +45,7 @@ char copyright[] = static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95"; */ static const char rcsid[] = - "$Id: mount_portal.c,v 1.9 1997/02/22 14:32:53 peter Exp $"; + "$Id: mount_portal.c,v 1.10 1997/03/11 12:34:58 peter Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -110,6 +110,7 @@ main(argc, argv) int mntflags = 0; char tag[32]; struct vfsconf vfc; + mode_t um; qelem q; int rc; @@ -159,11 +160,13 @@ main(argc, argv) if (so < 0) { err(EX_OSERR, "socket"); } + um = umask(077); (void) unlink(un.sun_path); if (bind(so, (struct sockaddr *) &un, sizeof(un)) < 0) err(1, NULL); (void) unlink(un.sun_path); + (void) umask(um); (void) listen(so, 5); |
