patch-2.3.39 linux/fs/ncpfs/ioctl.c
Next file: linux/fs/ncpfs/ncplib_kernel.c
Previous file: linux/fs/minix/inode.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Mon Jan 10 18:15:58 2000
- Orig file:
v2.3.38/linux/fs/ncpfs/ioctl.c
- Orig date:
Wed Dec 8 14:11:27 1999
diff -u --recursive --new-file v2.3.38/linux/fs/ncpfs/ioctl.c linux/fs/ncpfs/ioctl.c
@@ -15,6 +15,7 @@
#include <linux/ioctl.h>
#include <linux/sched.h>
#include <linux/mm.h>
+#include <linux/highuid.h>
#include <linux/ncp_fs.h>
@@ -128,7 +129,7 @@
return -EINVAL;
}
/* TODO: info.addr = server->m.serv_addr; */
- info.mounted_uid = server->m.mounted_uid;
+ info.mounted_uid = NEW_TO_OLD_UID(server->m.mounted_uid);
info.connection = server->connection;
info.buffer_size = server->buffer_size;
info.volume_number = NCP_FINFO(inode)->volNumber;
@@ -143,9 +144,14 @@
&& (current->uid != server->m.mounted_uid)) {
return -EACCES;
}
- if ((result = verify_area(VERIFY_WRITE, (uid_t *) arg,
- sizeof(uid_t))) != 0) {
- return result;
+ put_user(high2lowuid(server->m.mounted_uid), (old_uid_t *) arg);
+ return 0;
+
+ case NCP_IOC_GETMOUNTUID32:
+
+ if ((permission(inode, MAY_READ) != 0)
+ && (current->uid != server->m.mounted_uid)) {
+ return -EACCES;
}
put_user(server->m.mounted_uid, (uid_t *) arg);
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)