Skip to content

Commit 9ea764a

Browse files
committed
Remove use of geteuid under Win32.
1 parent ec5e0ef commit 9ea764a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/backend/commands/copy.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.200 2003/05/09 21:19:48 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.201 2003/05/16 02:40:19 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -761,10 +761,17 @@ DoCopy(const CopyStmt *stmt)
761761
copy_file = AllocateFile(filename, PG_BINARY_R);
762762

763763
if (copy_file == NULL)
764+
#ifndef WIN32
764765
elog(ERROR, "COPY command, running in backend with "
765766
"effective uid %d, could not open file '%s' for "
766767
"reading. Errno = %s (%d).",
767768
(int) geteuid(), filename, strerror(errno), errno);
769+
#else
770+
elog(ERROR, "COPY command, running in backend, "
771+
"could not open file '%s' for "
772+
"reading. Errno = %s (%d).",
773+
filename, strerror(errno), errno);
774+
#endif
768775

769776
fstat(fileno(copy_file), &st);
770777
if (S_ISDIR(st.st_mode))
@@ -814,10 +821,17 @@ DoCopy(const CopyStmt *stmt)
814821
umask(oumask);
815822

816823
if (copy_file == NULL)
824+
#ifndef WIN32
817825
elog(ERROR, "COPY command, running in backend with "
818826
"effective uid %d, could not open file '%s' for "
819827
"writing. Errno = %s (%d).",
820828
(int) geteuid(), filename, strerror(errno), errno);
829+
#else
830+
elog(ERROR, "COPY command, running in backend, "
831+
"could not open file '%s' for "
832+
"writing. Errno = %s (%d).",
833+
filename, strerror(errno), errno);
834+
#endif
821835
fstat(fileno(copy_file), &st);
822836
if (S_ISDIR(st.st_mode))
823837
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy