Projects
openEuler:24.03:SP1:Everything:64G
rpcbind
_service:tar_scm:rpcbind-0.2.4-systemd-rundir.p...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:rpcbind-0.2.4-systemd-rundir.patch of Package rpcbind
--- rpcbind-1.2.6/src/rpcbind.c 2023-03-27 15:17:28.116410124 +0800 +++ rpcbind-1.2.6-dev/src/rpcbind.c 2023-03-27 15:37:14.215749666 +0800 @@ -143,6 +143,10 @@ static void rbllist_add(rpcprog_t, rpcve static void terminate(int); static void parseargs(int, char *[]); +#ifndef WITHOUT_SYSTEMD +char *systemdtmp = "/usr/bin/systemd-tmpfiles --create rpcbind.conf"; +#endif + int main(int argc, char *argv[]) { @@ -150,13 +154,27 @@ main(int argc, char *argv[]) void *nc_handle; /* Net config handle */ struct rlimit rl; int maxrec = RPC_MAXDATASIZE; +#ifndef WITHOUT_SYSTEMD + int once = 1; +#endif parseargs(argc, argv); +#ifndef WITHOUT_SYSTEMD +tryagain: +#endif /* Check that another rpcbind isn't already running. */ if ((rpcbindlockfd = (open(RPCBINDDLOCK, - O_RDONLY|O_CREAT, 0444))) == -1) + O_RDONLY|O_CREAT, 0444))) == -1) { +#ifndef WITHOUT_SYSTEMD + if (once) { + once = system(systemdtmp); /* set once to avoid a warning */ + once = 0; + goto tryagain; + } +#endif err(1, "%s", RPCBINDDLOCK); + } if(flock(rpcbindlockfd, LOCK_EX|LOCK_NB) == -1 && errno == EWOULDBLOCK) errx(1, "another rpcbind is already running. Aborting");
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2