Re: Howto mount cifs from c?

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

 



Hi,

I use:

/* add rw etc*/

len1=sprintf(vfsdata+len0, ",rw,nodfs,unc=");
len0+=len1;
/* add the unc */

*(vfsdata+len0)='\\';
len0++;
*(vfsdata+len0)='\\';
len0++;

memcpy(vfsdata+len0, smb_server->name, strlen(smb_server->name));
len0+=strlen(smb_server->name);

*(vfsdata+len0)='\\';
len0++;

memcpy(vfsdata+len0, smb_share->name, strlen(smb_share->name));
len0+=strlen(smb_share->name);

if (strlen(smb_server->ipv4address)>0) {

         /* add ip */

         len1=sprintf(vfsdata+len0, ",ip=%s", smb_server->ipv4address);
         len0+=len1;

}
Here I got logmessages:

kernel: fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 118 with uid: 0
kernel: fs/cifs/connect.c: UNC:
\\SCLFS20091030\p//SCLFS20091030/public ip:
SCLFS20091030\p//SCLFS20091030/public

which is also bogus.

I think I'm not the person to remove the unc from the kernel with a
patch...but I think it's not required anymore, it adds nothing.
Right now it's required by the cifs module still as I checked.

I think there is something wrong with parsing the backslashes. They
should be forbidden. Some hint?

Stef
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux