BindSocket() on Mac OS X

BlitzMax Forums/BlitzMax Programming/BindSocket() on Mac OS X

Winni(Posted 2006) [#1]
Hi,

BindSocket() on Mac OS X only seems to work when the program was launched with superuser privileges. Does anybody have a good solution for that?

Thanks,
El Winni :)


Dreamora(Posted 2006) [#2]
There is none ... thats a security policy setting, nothing that BM can change about. The user would need to set the apps right properly so it operates with the needed privileges (or the installer would need to if that is even possible)

Would assume that Linux has similar issues when not running on administrator account.


Winni(Posted 2006) [#3]
Thanks, I was afraid that this would be the answer. Had the same issue with C#/Mono, by the way.

It makes sense from the security perspective - it's a good deal harder to write little backdoor applications and things like that. But on the other hand, it's also more complex to write "harmless" server applications.

The whole story is much easier with .NET for Windows, but well, thatīs probably one of the reasons why there is so much malware for that platform...

Nevertheless, there should be a way to create a functioning listening socket -without- having the -entire- application run with superuser rights. I probably just don't know enough about Unix to see the answer.


Winni(Posted 2006) [#4]
Short Update: Checked it under Ubuntu 5.10 (running in Parallels) and unsurprisingly found the same behaviour there.


Brucey(Posted 2006) [#5]
I thought it only applied to ports <= 1024 ?


Winni(Posted 2006) [#6]
Hi Brucey,

I had the problem on OS X with port 119 and with port 6667 - actually the only ones that Iīve tried.


Dreamora(Posted 2006) [#7]
Sure that 6667 was not used by another pc for something like ... say ED2K client?


Winni(Posted 2006) [#8]
Nope, it definitely was free. No other chat program running. ;-)