Hello! I'm running Win2K(SP2) German edition and have a problem with the "getdomainname()" function.
I have tracked it down to the following example: -- snip -- snap -- #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(int argc, char** argv) { char buffer[100]; int result=getdomainname(buffer, 100); if(result<0) perror("getdomainname"); fprintf(stderr, "domainname: '%s'\nResult: '%d'\n", buffer, result); return 0; } -- snap -- snip -- Even with administrator privileges, all I get is this: -- snip -- snap -- getdomainname: Permission denied domainname: '' Result: '-1' -- snap -- snip -- with the following cygwin: -- snip -- snap -- $ uname -a CYGWIN_NT-5.0 DIJKSTRA 1.3.9(0.51/3/2) 2002-01-21 12:48 i686 unknown -- snap -- snip -- According to manual pages on Linux, HPUX and Irix, getdomainname() does not produce an EPERM error. Even if there is no domain set, it should return without error. Is it me, the manual pages, or an error in cygwin? Best regards, Jan -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/