[Bug 809] mount doesn't work with cifs

bugzilla at busybox.net bugzilla at busybox.net
Mon Dec 14 20:03:51 UTC 2009


https://bugs.busybox.net/show_bug.cgi?id=809





--- Comment #4 from Christof <c.kaser at eduhi.at>  2009-12-14 20:03:46 UTC ---
That works.

.
#if 0 /* reported to break things */
.
.
#else
                len_and_sockaddr *lsa;
                char *ip, *dotted;
                char *s;

                // Get server IP
                s = strrchr(mp->mnt_fsname, '/');
                if (s <= mp->mnt_fsname+1)
                        goto report_error;
                *s = '\0';
                lsa = host2sockaddr(mp->mnt_fsname+2, 0);
                *s = '/';
                if (!lsa)
                        goto report_error;

                // Insert ip=... option into string flags.
                dotted = xmalloc_sockaddr2dotted_noport(&lsa->u.sa);
                ip = xasprintf("ip=%s", dotted);
                parse_mount_options(ip, &filteropts);
#endif
.

~ # strace -e mount mount //k3/ki /mnt -o user=u01,pass=u      
mount("//k3/ki", "/mnt", "cifs", MS_MANDLOCK|MS_SILENT,
"user=u01,pass=u,ip=10.8.0.3") = 0
~ # 
~ # mount | grep k3
//k3/ki on /mnt type cifs
(rw,mand,relatime,unc=\\k3\ki,username=u01,uid=0,noforceuid,gid=0,noforcegid,addr=10.8.0.3,posixpaths,serverino,acl,rsize=16384,wsize=57344)


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list