linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* buggy changes to fs/smbfs/inode.c
@ 2003-09-26  5:51 David S. Miller
  2003-09-26 19:12 ` Urban Widmark
  0 siblings, 1 reply; 3+ messages in thread
From: David S. Miller @ 2003-09-26  5:51 UTC (permalink / raw)
  To: Urban.Widmark; +Cc: linux-kernel


Your changes to fs/smbfs/inode.c do not build on platforms
that do not define CONFIG_UID16.  You cannot use low2highuid()
unless CONFIG_UID16 is known to be defined.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: buggy changes to fs/smbfs/inode.c
  2003-09-26  5:51 buggy changes to fs/smbfs/inode.c David S. Miller
@ 2003-09-26 19:12 ` Urban Widmark
  2003-09-30  8:37   ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Urban Widmark @ 2003-09-26 19:12 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-kernel

On Thu, 25 Sep 2003, David S. Miller wrote:

> 
> Your changes to fs/smbfs/inode.c do not build on platforms
> that do not define CONFIG_UID16.  You cannot use low2highuid()
> unless CONFIG_UID16 is known to be defined.

Ah, sorry about that.

I guess what I want is an OLD_TO_NEW_UID macro. How does this look?

/Urban


--- linux-2.6.0-test5-smbfs/fs/smbfs/inode.c-orig	Fri Sep 26 21:06:55 2003
+++ linux-2.6.0-test5-smbfs/fs/smbfs/inode.c	Fri Sep 26 20:58:00 2003
@@ -551,8 +551,8 @@
 	if (ver == SMB_MOUNT_OLDVERSION) {
 		mnt->version = oldmnt->version;
 
-		mnt->uid = low2highuid(oldmnt->uid);
-		mnt->gid = low2highuid(oldmnt->gid);
+		mnt->uid = OLD_TO_NEW_UID(oldmnt->uid);
+		mnt->gid = OLD_TO_NEW_GID(oldmnt->gid);
 
 		mnt->file_mode = (oldmnt->file_mode & S_IRWXUGO) | S_IFREG;
 		mnt->dir_mode = (oldmnt->dir_mode & S_IRWXUGO) | S_IFDIR;
--- linux-2.6.0-test5-smbfs/include/linux/highuid.h-orig	Fri Sep 26 21:07:34 2003
+++ linux-2.6.0-test5-smbfs/include/linux/highuid.h	Fri Sep 26 21:07:42 2003
@@ -56,6 +56,8 @@
 #define SET_GID16(var, gid)	var = high2lowgid(gid)
 #define NEW_TO_OLD_UID(uid)	high2lowuid(uid)
 #define NEW_TO_OLD_GID(gid)	high2lowgid(gid)
+#define OLD_TO_NEW_UID(uid)	low2highuid(uid)
+#define OLD_TO_NEW_GID(gid)	low2highgid(gid)
 
 /* specific to fs/stat.c */
 #define SET_OLDSTAT_UID(stat, uid)	(stat).st_uid = high2lowuid(uid)
@@ -69,6 +71,8 @@
 #define SET_GID16(var, gid)	do { ; } while (0)
 #define NEW_TO_OLD_UID(uid)	(uid)
 #define NEW_TO_OLD_GID(gid)	(gid)
+#define OLD_TO_NEW_UID(uid)	(uid)
+#define OLD_TO_NEW_GID(gid)	(gid)
 
 #define SET_OLDSTAT_UID(stat, uid)	(stat).st_uid = (uid)
 #define SET_OLDSTAT_GID(stat, gid)	(stat).st_gid = (gid)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: buggy changes to fs/smbfs/inode.c
  2003-09-26 19:12 ` Urban Widmark
@ 2003-09-30  8:37   ` David S. Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David S. Miller @ 2003-09-30  8:37 UTC (permalink / raw)
  To: Urban Widmark; +Cc: linux-kernel

On Fri, 26 Sep 2003 21:12:16 +0200 (CEST)
Urban Widmark <Urban.Widmark@enlight.net> wrote:

> I guess what I want is an OLD_TO_NEW_UID macro. How does this look?

That looks great, I'll push this off to Linus.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-30  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-26  5:51 buggy changes to fs/smbfs/inode.c David S. Miller
2003-09-26 19:12 ` Urban Widmark
2003-09-30  8:37   ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).