Comments (7)
Could you please try to set the for()-loop's limit in dsbmd.c, line 446, from 16 to 3?:
for (i = 0; i < 3; i++) {
if (pidfile_fileno(pfh) != i)
(void)close(i);
}
from dsbmd.
Anything else I could add to help tracking down the problem? Other than digging into the source myself ;) (might do that as well, but I guess it's easier for someone already knowing the structure…)
from dsbmd.
Hi Felix,
thank you for the report. I haven't found the time to dig into this, yet. But I'm going work on it later.
from dsbmd.
Ok, that fixes the problem. So, does this happen after opening the socket to winbind? ;) Thanks so far!
from dsbmd.
Excellent :)
DSBMD itself doesn't open the winbind socket. I guess it is involved thru PAM when getpwnam() gets called before DSBMD opens the listening socket. PAM/winbind opens a file, then DSBMD closes all file descriptors except for the logfile if -f is not given. DSBMD opens its listening socket, which has the same number as the fd opened by PAM/winbind. Some time after the first call to accept(), PAM/winbind closes its fd, which is now DSBMD's listening socket, and therefore further calls to accept() will fail.
from dsbmd.
DSBMD itself doesn't open the winbind socket.
I know ;)
I guess it is involved thru PAM when getpwnam() gets called
Certainly! (well probably NSS in that case..)
I was just wondering why some "daemonizing" code gets executed after accepting a connection. Probably, just closing fds is somewhat unsafe ;) I never did that, only used /dev/null
to replace the stdio streams (to not risk opening an fd 1 that's later confused for stdout
, for example).
Well, thanks again, I'm happy I can use this tool now! :)
from dsbmd.
Certainly! (well probably NSS in that case..)
Ah, thanks.
I was just wondering why some "daemonizing" code gets executed after accepting a connection. Probably, just closing fds is somewhat unsafe ;) I never did that, only used /dev/null to replace the stdio streams (to not risk opening an fd 1 that's later confused for stdout, for example).
Yes.
Well, thanks again, I'm happy I can use this tool now! :)
Me too :)
from dsbmd.
Related Issues (6)
- FreeBSD Port? HOT 1
- Automount ex4 and ntfs patitions from disk on boot HOT 34
- ntfs and ext doesn't mount HOT 25
- DSBMD system volume information HOT 7
- DSBMD in FreeBSD 13.0 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dsbmd.