Fix permisions when reading from stdin
authorGlenn L McGrath <bug1@ihug.co.nz>
Sun, 29 Jul 2001 06:04:26 +0000 (06:04 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Sun, 29 Jul 2001 06:04:26 +0000 (06:04 -0000)
coreutils/uuencode.c
uuencode.c

index 1789aefbb43e67d73adefeb79554a41111385e4e..fc037403a33a66ea84a05897466d897ec490dd30 100644 (file)
@@ -117,7 +117,7 @@ int uuencode_main(int argc, char **argv)
                        }
                        break;
                case 1:
-                       mode = umask(0666);
+                       mode = 0666 & ~umask(0666);
                        break;
                default:
                        show_usage();
index 1789aefbb43e67d73adefeb79554a41111385e4e..fc037403a33a66ea84a05897466d897ec490dd30 100644 (file)
@@ -117,7 +117,7 @@ int uuencode_main(int argc, char **argv)
                        }
                        break;
                case 1:
-                       mode = umask(0666);
+                       mode = 0666 & ~umask(0666);
                        break;
                default:
                        show_usage();