lkml.org 
[lkml]   [2001]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: uid_t and gid_t vs. __kernel_uid_t and __kernel_gid_t
On 14 May 01 at 15:00, Khachaturov, Vassilii wrote:

> I had to communicate uid/gid from an application down
> to a driver, and discovered that uid and gid in user
> space are different from those in kernel space.

ncpfs uses 'unsigned long' in its ncp_mount_data_v4, as MIPS uses
'long' type for uid/gid. Unfortunately it still needs conversions
on some archs, so maybe using u_int64_t is just best solution
(AFAIK as MIPS unsigned long is 64bit, you have to use u_int64_t
if you want same type accross architectures).

Kernel part then just checks wheter uid == (__kernel_uid_t)uid and
gives up if they differ.
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:53    [W:0.042 / U:0.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site