nobind makes autofs to crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:

        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


[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux