On Thu, 2012-07-26 at 00:50 +0400, Michael Tokarev wrote: > When a simple map is used with nobind option, and > the destination is local, automount segfaults. > > auto.master: > /t /etc/auto.t nobind > > auto.t: > usr :/usr > > > With this map, accessing /t/usr makes automount to > crash. This is because modules/mount_nfs.c:mount_mount() > has this code: Yes, that case is broken, of course, but it isn't the only case. The common case is where the map entry has a host name that is local, either localhost or a name that resolves to a local interface. I'll fix it. > > this = hosts; > while (this) { > ... > /* Port option specified, don't try to bind */ > if (!(nosymlink || nobind) && > !port_opt && this->proximity == PROXIMITY_LOCAL) { > ... > /* No hostname, can't be NFS */ > if (!this->name) { > this = this->next; > continue; > } > } > > /* Not a local host - do an NFS mount */ > if (this->rr && this->addr) { > ... > } else { > loc = malloc(strlen(this->name) + strlen(this->path) + 2); > > And here, it SIGSEGVs, since this->name is NULL. > > I wonder if nobind EVER worked, since it is only meaningful > for a local mounts, and this is exactly the place where it > does not work. > > Thanks, > > /mjt > -- > To unsubscribe from this list: send the line "unsubscribe autofs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe autofs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html