Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages!

You are not logged in. Login here for full access privileges.

Previous Message | Next Message | Back to Synchronet Multinode BBS Softwar...  <--  <--- Return to Home Page
   Networked Database  Synchronet Multinode BBS Softwar...   [530 / 900] RSS
 From   To   Subject   Date/Time 
Message   Va7aqd    Digital Man   Recycle semaphore?   April 1, 2019
 7:49 PM *  

  Re: Recycle semaphore?
  By: Digital Man to Va7aqd on Mon Apr 01 2019 04:14 pm

 > It sounds like you're missing some kernel module associated with
 > capabilities. Sorry, I don't know more than that (I didn't write this
 > portion of the code, Deuce did). I don't seem to have any modules with "cap"
 > in the name installed/running on my Debian systems, yet the capabilites work
 > fine.

OK, I think I have things sorted, but much of what was wrong seems to be with
the suggestions
in the documentation (and that's no complaint about the docs at all - there's
tons of great
info in the wiki).  Specifically, it looks like SBBS should be started as
root as it drops
privileges and runs as the user defined in ctrl/sbbs.ini appropriately.
However, in the wiki
docs, and I would point the finger mostly at the systemd page, which gives an
example with
systemd starting it as a non-root user & group.

Now I suspect it's possible to set some extra capabilities on the sbbs binary
to give it what
it needs, but it appears that "setcap 'cap_net_bind_service=ep'" isn't enough.
When doing an
strace on sbbs when starting (and complaining about it's inability to recycle),
it looks like
it's checking other capabilities (though I'm not familiar with granting
capabilities this way,
so I'm just guessing on what this means):

write(1, "Setting initial privileges\n", 27) = 27
capset({version=_LINUX_CAPABILITY_VERSION_1, pid=0}, {effective=1<<CAP_DAC_READ
_SEARCH|1<<CAP_SETGID|1<<CAP_SETUID|1<<CAP_NET_BIND_SERVICE|1<<CAP_S
YS_RESOURCE, permitted=1<<CAP_DAC_READ_SEARCH|1<<CAP_SETGID|1<<CAP_SETUID|1<<CA
P_NET_BIND_SERVICE|1<<CAP_SY
S_RESOURCE, inheritable=0}) = -1 EPERM (Operation not permitted)
write(1, "\r\rlinux_initialprivs() FAILED\n", 30) = 30

The only one the linux non-root user wiki page references is
cap_net_bind_service.

So, I was just working on doing things as securely as possible with the least
amount of
privileges, but really SBBS seems to do things like any smart system daemon
does - it starts
as root and drops down to user privileges so it can do things like run on
privileged ports
(without having to monkey around with specific capabilities settings on a
binary).

Thanks for all the assistance, I hope some of this pain is helpful.

---
 ■ Synchronet ■ VA7AQD's Tavern - bbs.isurf.ca
 * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  Show ANSI Codes | Hide BBCodes | Show Color Codes | Hide Encoding | Hide HTML Tags | Show Routing
Previous Message | Next Message | Back to Synchronet Multinode BBS Softwar...  <--  <--- Return to Home Page

VADV-PHP
Execution Time: 0.083 seconds

If you experience any problems with this website or need help, contact the webmaster.
VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved.
Virtual Advanced Copyright © 1995-1997 Roland De Graaf.
v2.0.140505

Warning: Unknown: open(c:\Sessions\sess_6t70fif7ka17tl70an7ptr5d34, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (c:\Sessions) in Unknown on line 0 PHP Warning: session_start(): open(c:\Sessions\sess_6t70fif7ka17tl70an7ptr5d34, O_RDWR) failed: No such file or directory (2) in D:\wc5\http\public\VADV\include\common.inc.php on line 45 PHP Warning: Unknown: open(c:\Sessions\sess_6t70fif7ka17tl70an7ptr5d34, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (c:\Sessions) in Unknown on line 0