Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
cd16cdfe
Commit
cd16cdfe
authored
Oct 07, 2003
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://nfsclient.bkbits.net/linux-2.5
into fys.uio.no:/home/linux/bitkeeper/nfsclient-2.5
parents
874ce338
661f482b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
28 deletions
+17
-28
fs/smbfs/ioctl.c
fs/smbfs/ioctl.c
+2
-2
include/linux/highuid.h
include/linux/highuid.h
+10
-25
include/linux/swap.h
include/linux/swap.h
+5
-1
No files found.
fs/smbfs/ioctl.c
View file @
cd16cdfe
...
...
@@ -31,8 +31,8 @@ smb_ioctl(struct inode *inode, struct file *filp,
int
result
=
-
EINVAL
;
switch
(
cmd
)
{
uid16_t
uid16
=
0
;
uid_t
uid32
=
0
;
uid16_t
uid16
;
uid_t
uid32
;
case
SMB_IOC_GETMOUNTUID
:
SET_UID
(
uid16
,
server
->
mnt
->
mounted_uid
);
result
=
put_user
(
uid16
,
(
uid16_t
*
)
arg
);
...
...
include/linux/highuid.h
View file @
cd16cdfe
...
...
@@ -53,37 +53,22 @@ extern void __bad_gid(void);
#define low2highuid(uid) ((uid) == (old_uid_t)-1 ? (uid_t)-1 : (uid_t)(uid))
#define low2highgid(gid) ((gid) == (old_gid_t)-1 ? (gid_t)-1 : (gid_t)(gid))
/* uid/gid input should be always 32bit uid_t */
#define SET_UID(var, uid) \
do { \
if (sizeof(var) == sizeof(old_uid_t)) (var) = high2lowuid(uid); \
else if (sizeof(var) >= sizeof(uid)) (var) = (uid); \
else __bad_uid(); \
} while(0)
#define SET_GID(var, gid) \
do { \
if (sizeof(var) == sizeof(old_gid_t)) (var) = high2lowgid(gid); \
else if (sizeof(var) >= sizeof(gid)) (var) = (gid); \
else __bad_gid(); \
} while(0)
#define __convert_uid(size, uid) \
(size >= sizeof(uid) ? (uid) : high2lowuid(uid))
#define __convert_gid(size, gid) \
(size >= sizeof(gid) ? (gid) : high2lowgid(gid))
#else
#define SET_UID(var,uid) \
do { \
if (sizeof(var) < sizeof(uid)) __bad_uid(); \
(var) = (uid); \
} while (0)
#define SET_GID(var,gid) \
do { \
if (sizeof(var) < sizeof(gid)) __bad_gid(); \
(var) = (gid); \
} while (0);
#define __convert_uid(size, uid) (uid)
#define __convert_gid(size, gid) (gid)
#endif
/* !CONFIG_UID16 */
/* uid/gid input should be always 32bit uid_t */
#define SET_UID(var, uid) do { (var) = __convert_uid(sizeof(var), (uid)); } while (0)
#define SET_GID(var, gid) do { (var) = __convert_gid(sizeof(var), (gid)); } while (0)
/*
* Everything below this line is needed on all architectures, to deal with
...
...
include/linux/swap.h
View file @
cd16cdfe
...
...
@@ -261,12 +261,16 @@ extern spinlock_t swaplock;
#define lookup_swap_cache(swp) NULL
#define valid_swaphandles(swp, off) 0
#define can_share_swap_page(p) 0
#define remove_exclusive_swap_page(p) 0
#define move_to_swap_cache(p, swp) 1
#define move_from_swap_cache(p, i, m) 1
#define __delete_from_swap_cache(p)
/*NOTHING*/
#define delete_from_swap_cache(p)
/*NOTHING*/
static
inline
int
remove_exclusive_swap_page
(
struct
page
*
p
)
{
return
0
;
}
static
inline
swp_entry_t
get_swap_page
(
void
)
{
swp_entry_t
entry
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment