Fix permisions when reading from stdin
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index 1789aef..fc03740 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -117,7 +117,7 @@
 			}
 			break;
 		case 1:
-			mode = umask(0666);
+			mode = 0666 & ~umask(0666);
 			break;
 		default:
 			show_usage();
diff --git a/uuencode.c b/uuencode.c
index 1789aef..fc03740 100644
--- a/uuencode.c
+++ b/uuencode.c
@@ -117,7 +117,7 @@
 			}
 			break;
 		case 1:
-			mode = umask(0666);
+			mode = 0666 & ~umask(0666);
 			break;
 		default:
 			show_usage();