Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3C567E1E.7BD31B1E@synaps-ing.de> Date: Tue, 29 Jan 2002 11:49:02 +0100 From: Jan Kellmer Organization: Synaps Ingenieur-Gesellschaft mbH X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.10 i686) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: getdomainname trouble on Win2K/cygwin 1.3.9 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 #include #include 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/