4 * Copyright (C) 1995, 1996 by Volker Lendecke
5 * Copyright (C) 1997 by Volker Lendecke
7 * Please add a note about your changes to smbfs in the ChangeLog file.
10 #include <linux/errno.h>
12 #include <linux/ioctl.h>
13 #include <linux/time.h>
15 #include <linux/highuid.h>
17 #include <linux/smb_fs.h>
18 #include <linux/smb_mount.h>
20 #include <asm/uaccess.h>
25 smb_ioctl(struct inode
*inode
, struct file
*filp
,
26 unsigned int cmd
, unsigned long arg
)
28 struct smb_sb_info
*server
= server_from_inode(inode
);
29 struct smb_conn_opt opt
;
33 case SMB_IOC_GETMOUNTUID
:
34 result
= put_user(NEW_TO_OLD_UID(server
->mnt
->mounted_uid
),
37 case SMB_IOC_GETMOUNTUID32
:
38 result
= put_user(server
->mnt
->mounted_uid
, (uid_t
*) arg
);
42 /* arg is smb_conn_opt, or NULL if no connection was made */
45 smb_lock_server(server
);
46 server
->state
= CONN_RETRIED
;
47 printk(KERN_ERR
"Connection attempt failed! [%d]\n",
50 smb_unlock_server(server
);
55 if (!copy_from_user(&opt
, (void *)arg
, sizeof(opt
)))
56 result
= smb_newconn(server
, &opt
);