my_name = "127.0.0.1";
/* 2. Reject any registrations for non-lockd services.
+ *
* This is specific to the linux kernel lockd, which
* makes the callback procedure part of the lockd interface.
+ * It is also prone to break when lockd changes its callback
+ * procedure number -- which, in fact, has now happened once.
+ * There must be a better way.... XXX FIXME
*/
- if (id->my_proc != 100021) {
+ if (id->my_prog != 100021 ||
+ (id->my_proc != 16 && id->my_proc != 24))
+ {
log(L_WARNING,
- "Attempt to register callback to service %d",
- id->my_proc);
+ "Attempt to register callback to %d/%d",
+ id->my_prog, id->my_proc);
goto failure;
}
*/
path=xmalloc(strlen(SM_DIR)+strlen(mon_name)+2);
- sprintf(path, SM_DIR "/%s", mon_name);
+ sprintf(path, "%s/%s", SM_DIR, mon_name);
if ((fd = open(path, O_WRONLY|O_SYNC|O_CREAT, S_IRUSR|S_IWUSR)) < 0) {
/* Didn't fly. We won't monitor. */
log(L_ERROR, "creat(%s) failed: %m", path);