Problem setting up a server on UDP port 59

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Steve Ramm

Problem setting up a server on UDP port 59

Post by Steve Ramm »

I have a program that sets up a server on UDP port 59; it runs with no
problem under windows XP. Under wine it fails, the log shows "Permission
denied" for the WS_bind function.

Has anyone else seen this? Does anyone know how to work around this?



trace:winsock:WSAStartup succeeded

trace:winsock:WS_socket af=2 type=1 protocol=0

trace:winsock:WSASocketA af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0048

trace:winsock:WS_bind socket 0048, ptr 0x32fbec { family 2, address
127.0.0.1, port 0 }, length 16

trace:winsock:WS_listen socket 0048, backlog 3

trace:winsock:WS_getsockname socket: 0048, ptr 0x32fc0c, len 10

trace:winsock:DllMain 0x7ee60000 0x2 (nil)

trace:winsock:WS_socket af=2 type=1 protocol=0

trace:winsock:WSASocketA af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0054

trace:winsock:WS_connect socket 0054, ptr 0x7e85169c { family 2, address
127.0.0.1, port 56208 }, length 16

trace:winsock:DllMain 0x7ee60000 0x3 (nil)

trace:winsock:WS_select read 0x8210b0, write (nil), excp (nil) timeout
0x32fb9c

trace:winsock:__WSAFDIsSet (72,0x8210b0(1))

trace:winsock:WS_accept socket 0048

trace:winsock:WS_getpeername socket: 004c, ptr 0x32fbfc, len 00000010

trace:winsock:WS_closesocket socket 0048

trace:winsock:WS_select read 0x8210b0, write (nil), excp (nil) timeout
0x32fb6c

trace:winsock:WS_socket af=2 type=2 protocol=0

trace:winsock:WSASocketA af=2 type=2 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=2 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0048

trace:winsock:WS_bind socket 0048, ptr 0x32fbe4 { family 2, address
0.0.0.0, port 59 }, length 16

warn:winsock:WS_bind failure - errno = 13

warn:winsock:wsaErrno errno 13, (Permission denied).

trace:winsock:WS_closesocket socket 0048

-
This message is subject to Imagination Technologies' e-mail terms: http://www.imgtec.com/e-mail.htm
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-us ... chment.htm
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

Problem setting up a server on UDP port 59

Post by austin987 »

On Mon, Feb 9, 2009 at 10:35 AM, Steve Ramm <[email protected]> wrote:
I have a program that sets up a server on UDP port 59; it runs with no
problem under windows XP. Under wine it fails, the log shows "Permission
denied" for the WS_bind function.

Has anyone else seen this? Does anyone know how to work around this?



trace:winsock:WSAStartup succeeded

trace:winsock:WS_socket af=2 type=1 protocol=0

trace:winsock:WSASocketA af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0048

trace:winsock:WS_bind socket 0048, ptr 0x32fbec { family 2, address
127.0.0.1, port 0 }, length 16

trace:winsock:WS_listen socket 0048, backlog 3

trace:winsock:WS_getsockname socket: 0048, ptr 0x32fc0c, len 10

trace:winsock:DllMain 0x7ee60000 0x2 (nil)

trace:winsock:WS_socket af=2 type=1 protocol=0

trace:winsock:WSASocketA af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0054

trace:winsock:WS_connect socket 0054, ptr 0x7e85169c { family 2, address
127.0.0.1, port 56208 }, length 16

trace:winsock:DllMain 0x7ee60000 0x3 (nil)

trace:winsock:WS_select read 0x8210b0, write (nil), excp (nil) timeout
0x32fb9c

trace:winsock:__WSAFDIsSet (72,0x8210b0(1))

trace:winsock:WS_accept socket 0048

trace:winsock:WS_getpeername socket: 004c, ptr 0x32fbfc, len 00000010

trace:winsock:WS_closesocket socket 0048

trace:winsock:WS_select read 0x8210b0, write (nil), excp (nil) timeout
0x32fb6c

trace:winsock:WS_socket af=2 type=2 protocol=0

trace:winsock:WSASocketA af=2 type=2 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=2 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0048

trace:winsock:WS_bind socket 0048, ptr 0x32fbe4 { family 2, address
0.0.0.0, port 59 }, length 16

warn:winsock:WS_bind failure - errno = 13

warn:winsock:wsaErrno errno 13, (Permission denied).

trace:winsock:WS_closesocket socket 0048

-
This message is subject to Imagination Technologies' e-mail terms: http://www.imgtec.com/e-mail.htm
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-us ... chment.htm
Port 59 is reserved for root on Linux.

You could use POSIX capabilities to work around it, or install/run the
program as root (not recommended for most apps, except circumstances
like these, because it gives the application access to your entire
system).

--
-Austin
Steve Ramm

Problem setting up a server on UDP port 59

Post by Steve Ramm »

Thanks, yes - running as root solves that problem but uncovers
another... actually in this case I can tell the program to use another
port & it is not a problem.
I will report on the other issue when I have some sensible debug output.

Steve

-----Original Message-----
From: Austin English [mailto:[email protected]]
Sent: 09 February 2009 17:19
To: Steve Ramm
Cc: [email protected]
Subject: Re: [Wine] Problem setting up a server on UDP port 59

On Mon, Feb 9, 2009 at 10:35 AM, Steve Ramm <[email protected]>
wrote:
I have a program that sets up a server on UDP port 59; it runs with no
problem under windows XP. Under wine it fails, the log shows
"Permission
denied" for the WS_bind function.

Has anyone else seen this? Does anyone know how to work around this?



trace:winsock:WSAStartup succeeded

trace:winsock:WS_socket af=2 type=1 protocol=0

trace:winsock:WSASocketA af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0048

trace:winsock:WS_bind socket 0048, ptr 0x32fbec { family 2, address
127.0.0.1, port 0 }, length 16

trace:winsock:WS_listen socket 0048, backlog 3

trace:winsock:WS_getsockname socket: 0048, ptr 0x32fc0c, len 10

trace:winsock:DllMain 0x7ee60000 0x2 (nil)

trace:winsock:WS_socket af=2 type=1 protocol=0

trace:winsock:WSASocketA af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0054

trace:winsock:WS_connect socket 0054, ptr 0x7e85169c { family 2,
address
127.0.0.1, port 56208 }, length 16

trace:winsock:DllMain 0x7ee60000 0x3 (nil)

trace:winsock:WS_select read 0x8210b0, write (nil), excp (nil) timeout
0x32fb9c

trace:winsock:__WSAFDIsSet (72,0x8210b0(1))

trace:winsock:WS_accept socket 0048

trace:winsock:WS_getpeername socket: 004c, ptr 0x32fbfc, len 00000010

trace:winsock:WS_closesocket socket 0048

trace:winsock:WS_select read 0x8210b0, write (nil), excp (nil) timeout
0x32fb6c

trace:winsock:WS_socket af=2 type=2 protocol=0

trace:winsock:WSASocketA af=2 type=2 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=2 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0048

trace:winsock:WS_bind socket 0048, ptr 0x32fbe4 { family 2, address
0.0.0.0, port 59 }, length 16

warn:winsock:WS_bind failure - errno = 13

warn:winsock:wsaErrno errno 13, (Permission denied).

trace:winsock:WS_closesocket socket 0048

-
This message is subject to Imagination Technologies' e-mail terms:
http://www.imgtec.com/e-mail.htm
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.winehq.org/pipermail/wine-us ... 9/466a04e6
/attachment.htm

Port 59 is reserved for root on Linux.

You could use POSIX capabilities to work around it, or install/run the
program as root (not recommended for most apps, except circumstances
like these, because it gives the application access to your entire
system).

--
-Austin
-
This message is subject to Imagination Technologies' e-mail terms: http://www.imgtec.com/e-mail.htm
-
Steve Ramm

Problem setting up a server on UDP port 59

Post by Steve Ramm »

The uncovered problem seems to be something to do with the following
warnings and error:

warn:sync:SetNamedPipeHandleState stub: 0x78 0x7e7344e8/2 (nil) (nil)
err:service:service_control_dispatcher failed to create control pipe
error = 3
warn:rpc:RPCRT4_receive_fragment Short read of header, -1 bytes
warn:rpc:RPCRT4_io_thread receive failed with error 6be

Is this something not implemented in kernel32?

-----Original Message-----
From: Steve Ramm
Sent: 09 February 2009 17:24
To: 'Austin English'
Cc: [email protected]
Subject: RE: [Wine] Problem setting up a server on UDP port 59

Thanks, yes - running as root solves that problem but uncovers
another... actually in this case I can tell the program to use another
port & it is not a problem.
I will report on the other issue when I have some sensible debug output.

Steve

-----Original Message-----
From: Austin English [mailto:[email protected]]
Sent: 09 February 2009 17:19
To: Steve Ramm
Cc: [email protected]
Subject: Re: [Wine] Problem setting up a server on UDP port 59

On Mon, Feb 9, 2009 at 10:35 AM, Steve Ramm <[email protected]>
wrote:
I have a program that sets up a server on UDP port 59; it runs with no
problem under windows XP. Under wine it fails, the log shows
"Permission
denied" for the WS_bind function.

Has anyone else seen this? Does anyone know how to work around this?



trace:winsock:WSAStartup succeeded

trace:winsock:WS_socket af=2 type=1 protocol=0

trace:winsock:WSASocketA af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0048

trace:winsock:WS_bind socket 0048, ptr 0x32fbec { family 2, address
127.0.0.1, port 0 }, length 16

trace:winsock:WS_listen socket 0048, backlog 3

trace:winsock:WS_getsockname socket: 0048, ptr 0x32fc0c, len 10

trace:winsock:DllMain 0x7ee60000 0x2 (nil)

trace:winsock:WS_socket af=2 type=1 protocol=0

trace:winsock:WSASocketA af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=1 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0054

trace:winsock:WS_connect socket 0054, ptr 0x7e85169c { family 2,
address
127.0.0.1, port 56208 }, length 16

trace:winsock:DllMain 0x7ee60000 0x3 (nil)

trace:winsock:WS_select read 0x8210b0, write (nil), excp (nil) timeout
0x32fb9c

trace:winsock:__WSAFDIsSet (72,0x8210b0(1))

trace:winsock:WS_accept socket 0048

trace:winsock:WS_getpeername socket: 004c, ptr 0x32fbfc, len 00000010

trace:winsock:WS_closesocket socket 0048

trace:winsock:WS_select read 0x8210b0, write (nil), excp (nil) timeout
0x32fb6c

trace:winsock:WS_socket af=2 type=2 protocol=0

trace:winsock:WSASocketA af=2 type=2 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW af=2 type=2 protocol=0 protocol_info=(nil)
group=0 flags=0x1

trace:winsock:WSASocketW created 0048

trace:winsock:WS_bind socket 0048, ptr 0x32fbe4 { family 2, address
0.0.0.0, port 59 }, length 16

warn:winsock:WS_bind failure - errno = 13

warn:winsock:wsaErrno errno 13, (Permission denied).

trace:winsock:WS_closesocket socket 0048

-
This message is subject to Imagination Technologies' e-mail terms:
http://www.imgtec.com/e-mail.htm
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.winehq.org/pipermail/wine-us ... 9/466a04e6
/attachment.htm

Port 59 is reserved for root on Linux.

You could use POSIX capabilities to work around it, or install/run the
program as root (not recommended for most apps, except circumstances
like these, because it gives the application access to your entire
system).

--
-Austin
Steve Ramm

Problem setting up a server on UDP port 59

Post by Steve Ramm »

Steve Ramm wrote:
The uncovered problem seems to be something to do with the following
warnings and error:

warn:sync:SetNamedPipeHandleState stub: 0x78 0x7e7344e8/2 (nil)
(nil)
err:service:service_control_dispatcher failed to create control pipe
error = 3
warn:rpc:RPCRT4_receive_fragment Short read of header, -1 bytes
warn:rpc:RPCRT4_io_thread receive failed with error 6be

Is this something not implemented in kernel32?
James McKenzie wrote:
Can you try running this program on Wine 1.1.15?
Yes - it is now different:

warn:winsock:wsaErrno errno 22, (Invalid argument).
warn:sync:SetNamedPipeHandleState stub: 0x78 0x7e72a4e8/2 (nil) (nil)
fixme:wtsapi:WTSQuerySessionInformationA Stub (nil) 0xffffffff 4
0x7e5b2204 0x7e5b21f4
warn:winsock:WS_bind failure - errno = 99

So the program now progresses to a hanging state rather than exiting.
The first warning (and perhaps the second as a result) is not an
immediate problem - I think it is the fixme that causes the failure.

Cheers
Steve
Locked