Index: sbin/newfs/newfs.8
===================================================================
RCS file: /cvs/src/sbin/newfs/newfs.8,v
retrieving revision 1.74
diff -u -p -r1.74 newfs.8
--- sbin/newfs/newfs.8	17 Mar 2016 07:18:34 -0000	1.74
+++ sbin/newfs/newfs.8	7 Apr 2019 05:49:13 -0000
@@ -293,7 +293,9 @@ is a directory, populate the created mfs
 contents of the directory.
 If
 .Ar file
-is a block device, populate the created mfs file system with the
+is a block device or a
+.Xr disklabel 8
+UID (DUID), populate the created mfs file system with the
 contents of the FFS file system contained on the device.
 .El
 .Pp
Index: sbin/newfs/newfs.c
===================================================================
RCS file: /cvs/src/sbin/newfs/newfs.c,v
retrieving revision 1.111
diff -u -p -r1.111 newfs.c
--- sbin/newfs/newfs.c	25 Nov 2018 17:12:10 -0000	1.111
+++ sbin/newfs/newfs.c	7 Apr 2019 05:49:13 -0000
@@ -174,7 +174,7 @@ main(int argc, char *argv[])
 	struct stat st;
 	struct statfs *mp;
 	struct rlimit rl;
-	int fsi = -1, oflagset = 0, fso, len, n, maxpartitions;
+	int fsi = -1, oflagset = 0, fso, fp, fd, len, n, maxpartitions;
 	char *cp = NULL, *s1, *s2, *special, *opstring, *realdev;
 #ifdef MFS
 	char mountfromname[BUFSIZ];
@@ -526,6 +526,16 @@ havelabel:
 			args.export_info.ex_flags = MNT_EXRDONLY;
 		if (mntflags & MNT_NOPERM)
 			mntflags |= MNT_NODEV | MNT_NOEXEC;
+
+		if (pop != NULL && isduid(pop, 0)) { 
+			/* Resolve DUID to block device */
+			fd = opendev(pop, O_RDONLY, OPENDEV_BLCK, &realdev);
+			if (fd < 0)
+				err(1, "could not open %s", pop);
+
+			close(fd);
+			pop = realdev;  
+		}
 
 		switch (pid = fork()) {
 		case -1:
