diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c index b4fc934900b..21e6fd3a86c 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -77,6 +77,7 @@ extern int errno; | |||
| 77 | #include "charset.h" | 77 | #include "charset.h" |
| 78 | #include "coding.h" | 78 | #include "coding.h" |
| 79 | #include "window.h" | 79 | #include "window.h" |
| 80 | #include "blockinput.h" | ||
| 80 | 81 | ||
| 81 | #ifdef WINDOWSNT | 82 | #ifdef WINDOWSNT |
| 82 | #define NOMINMAX 1 | 83 | #define NOMINMAX 1 |
| @@ -1386,7 +1387,9 @@ See also the function `substitute-in-file-name'. */) | |||
| 1386 | bcopy ((char *) nm, o, p - nm); | 1387 | bcopy ((char *) nm, o, p - nm); |
| 1387 | o [p - nm] = 0; | 1388 | o [p - nm] = 0; |
| 1388 | 1389 | ||
| 1390 | BLOCK_INPUT; | ||
| 1389 | pw = (struct passwd *) getpwnam (o + 1); | 1391 | pw = (struct passwd *) getpwnam (o + 1); |
| 1392 | UNBLOCK_INPUT; | ||
| 1390 | if (pw) | 1393 | if (pw) |
| 1391 | { | 1394 | { |
| 1392 | newdir = (unsigned char *) pw -> pw_dir; | 1395 | newdir = (unsigned char *) pw -> pw_dir; |
| @@ -1917,7 +1920,9 @@ See also the function `substitute-in-file-name'.") | |||
| 1917 | o[len] = 0; | 1920 | o[len] = 0; |
| 1918 | 1921 | ||
| 1919 | /* Look up the user name. */ | 1922 | /* Look up the user name. */ |
| 1923 | BLOCK_INPUT; | ||
| 1920 | pw = (struct passwd *) getpwnam (o + 1); | 1924 | pw = (struct passwd *) getpwnam (o + 1); |
| 1925 | UNBLOCK_INPUT; | ||
| 1921 | if (!pw) | 1926 | if (!pw) |
| 1922 | error ("\"%s\" isn't a registered user", o + 1); | 1927 | error ("\"%s\" isn't a registered user", o + 1); |
| 1923 | 1928 | ||
| @@ -2111,10 +2116,11 @@ search_embedded_absfilename (nm, endp) | |||
| 2111 | /* If we have ~user and `user' exists, discard | 2116 | /* If we have ~user and `user' exists, discard |
| 2112 | everything up to ~. But if `user' does not exist, leave | 2117 | everything up to ~. But if `user' does not exist, leave |
| 2113 | ~user alone, it might be a literal file name. */ | 2118 | ~user alone, it might be a literal file name. */ |
| 2114 | if ((pw = getpwnam (o + 1))) | 2119 | BLOCK_INPUT; |
| 2120 | pw = getpwnam (o + 1); | ||
| 2121 | UNBLOCK_INPUT; | ||
| 2122 | if (pw) | ||
| 2115 | return p; | 2123 | return p; |
| 2116 | else | ||
| 2117 | xfree (pw); | ||
| 2118 | } | 2124 | } |
| 2119 | else | 2125 | else |
| 2120 | return p; | 2126 | return p; |