drivers/char/drm/drm_fops.h | 2 +- drivers/isdn/capi/capifs.c | 4 ++-- drivers/media/video/cpia.c | 2 +- drivers/net/wan/sbni.c | 8 ++++---- fs/devfs/base.c | 18 +++++++++--------- fs/jffs/inode-v23.c | 28 ++++++++++++++-------------- fs/jffs2/fs.c | 4 ++-- kernel/acct.c | 4 ++-- net/ax25/af_ax25.c | 2 +- net/ax25/ax25_route.c | 2 +- net/netrom/af_netrom.c | 4 ++-- net/rose/af_rose.c | 4 ++-- security/selinux/hooks.c | 4 ++-- 13 files changed, 43 insertions(+), 43 deletions(-) diff -puN kernel/acct.c~d-task-xid-fixes kernel/acct.c --- 25/kernel/acct.c~d-task-xid-fixes 2003-09-28 16:25:04.000000000 -0700 +++ 25-akpm/kernel/acct.c 2003-09-28 16:25:31.000000000 -0700 @@ -341,8 +341,8 @@ static void do_acct_process(long exitcod ac.ac_utime = encode_comp_t(current->utime); ac.ac_stime = encode_comp_t(current->stime); /* we really need to bite the bullet and change layout */ - ac.ac_uid = current->uid; - ac.ac_gid = current->gid; + ac.ac_uid = tsk_uid(current); + ac.ac_gid = tsk_gid(current); ac.ac_tty = current->tty ? old_encode_dev(tty_devnum(current->tty)) : 0; ac.ac_flag = 0; diff -puN drivers/char/drm/drm_fops.h~d-task-xid-fixes drivers/char/drm/drm_fops.h --- 25/drivers/char/drm/drm_fops.h~d-task-xid-fixes 2003-09-28 16:25:04.000000000 -0700 +++ 25-akpm/drivers/char/drm/drm_fops.h 2003-09-28 16:25:51.000000000 -0700 @@ -64,7 +64,7 @@ int DRM(open_helper)(struct inode *inode memset(priv, 0, sizeof(*priv)); filp->private_data = priv; - priv->uid = current->euid; + priv->uid = tsk_euid(current); priv->pid = current->pid; priv->minor = minor; priv->dev = dev; diff -puN security/selinux/hooks.c~d-task-xid-fixes security/selinux/hooks.c --- 25/security/selinux/hooks.c~d-task-xid-fixes 2003-09-28 16:32:22.000000000 -0700 +++ 25-akpm/security/selinux/hooks.c 2003-09-28 16:34:24.000000000 -0700 @@ -1459,8 +1459,8 @@ static int selinux_bprm_secureexec (stru to retain it, as the new userland will simply use the value passed by AT_SECURE to decide whether to enable secure mode. */ - return ( atsecure || current->euid != current->uid || - current->egid != current->gid); + return ( atsecure || tsk_euid(current) != tsk_uid(current) || + tsk_egid(current) != tsk_gid(current)); } static void selinux_bprm_free_security(struct linux_binprm *bprm) diff -puN fs/devfs/base.c~d-task-xid-fixes fs/devfs/base.c --- 25/fs/devfs/base.c~d-task-xid-fixes 2003-09-28 16:32:41.000000000 -0700 +++ 25-akpm/fs/devfs/base.c 2003-09-28 16:36:31.000000000 -0700 @@ -1439,8 +1439,8 @@ static int devfsd_notify_de (struct devf static void devfsd_notify (struct devfs_entry *de,unsigned short type) { - devfsd_notify_de(de, type, de->mode, current->euid, - current->egid, &fs_info); + devfsd_notify_de(de, type, de->mode, tsk_euid(current), + tsk_egid(current), &fs_info); } int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) @@ -1907,7 +1907,7 @@ static int try_modload (struct devfs_ent buf->u.name = name; WRITE_ENTRY_MAGIC (buf, MAGIC_VALUE); if ( !devfsd_notify_de (buf, DEVFSD_NOTIFY_LOOKUP, 0, - current->euid, current->egid, fs_info) ) + tsk_euid(current), tsk_egid(current), fs_info) ) return -ENOENT; /* Possible success: event has been queued */ return 0; @@ -2406,8 +2406,8 @@ static int devfs_symlink (struct inode * dentry->d_name.name, err); if (err < 0) return err; de->vfs_deletable = TRUE; - de->inode.uid = current->euid; - de->inode.gid = current->egid; + de->inode.uid = tsk_euid(current); + de->inode.gid = tsk_egid(current); de->inode.atime = CURRENT_TIME; de->inode.mtime = CURRENT_TIME; de->inode.ctime = CURRENT_TIME; @@ -2437,8 +2437,8 @@ static int devfs_mkdir (struct inode *di de->vfs_deletable = TRUE; if ( ( err = _devfs_append_entry (parent, de, NULL) ) != 0 ) return err; - de->inode.uid = current->euid; - de->inode.gid = current->egid; + de->inode.uid = tsk_euid(current); + de->inode.gid = tsk_egid(current); de->inode.atime = CURRENT_TIME; de->inode.mtime = CURRENT_TIME; de->inode.ctime = CURRENT_TIME; @@ -2505,8 +2505,8 @@ static int devfs_mknod (struct inode *di de->u.bdev.dev = rdev; if ( ( err = _devfs_append_entry (parent, de, NULL) ) != 0 ) return err; - de->inode.uid = current->euid; - de->inode.gid = current->egid; + de->inode.uid = tsk_euid(current); + de->inode.gid = tsk_egid(current); de->inode.atime = CURRENT_TIME; de->inode.mtime = CURRENT_TIME; de->inode.ctime = CURRENT_TIME; diff -puN drivers/isdn/capi/capifs.c~d-task-xid-fixes drivers/isdn/capi/capifs.c --- 25/drivers/isdn/capi/capifs.c~d-task-xid-fixes 2003-09-28 16:32:51.000000000 -0700 +++ 25-akpm/drivers/isdn/capi/capifs.c 2003-09-28 16:37:03.000000000 -0700 @@ -193,8 +193,8 @@ void capifs_new_ncci(char type, unsigned inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; inode->i_blocks = 0; inode->i_blksize = 1024; - inode->i_uid = options.setuid ? options.uid : current->fsuid; - inode->i_gid = options.setgid ? options.gid : current->fsgid; + inode->i_uid = options.setuid ? options.uid : tsk_fsuid(current); + inode->i_gid = options.setgid ? options.gid : tsk_fsgid(current); inode->i_nlink = 1; init_special_inode(inode, S_IFCHR | options.mode, device); dentry = get_node(type, num); diff -puN drivers/media/video/cpia.c~d-task-xid-fixes drivers/media/video/cpia.c --- 25/drivers/media/video/cpia.c~d-task-xid-fixes 2003-09-28 16:33:21.000000000 -0700 +++ 25-akpm/drivers/media/video/cpia.c 2003-09-28 16:37:31.000000000 -0700 @@ -3222,7 +3222,7 @@ static int cpia_open(struct inode *inode /* Set ownership of /proc/cpia/videoX to current user */ if(cam->proc_entry) - cam->proc_entry->uid = current->uid; + cam->proc_entry->uid = tsk_uid(current); /* set mark for loading first frame uncompressed */ cam->first_frame = 1; diff -puN fs/jffs/inode-v23.c~d-task-xid-fixes fs/jffs/inode-v23.c --- 25/fs/jffs/inode-v23.c~d-task-xid-fixes 2003-09-28 16:40:31.000000000 -0700 +++ 25-akpm/fs/jffs/inode-v23.c 2003-09-28 16:41:23.000000000 -0700 @@ -482,8 +482,8 @@ jffs_rename(struct inode *old_dir, struc raw_inode.pino = new_dir_f->ino; /* raw_inode.version = f->highest_version + 1; */ raw_inode.mode = f->mode; - raw_inode.uid = current->fsuid; - raw_inode.gid = current->fsgid; + raw_inode.uid = tsk_fsuid(current); + raw_inode.gid = tsk_fsgid(current); #if 0 raw_inode.uid = f->uid; raw_inode.gid = f->gid; @@ -867,9 +867,9 @@ jffs_mkdir(struct inode *dir, struct den raw_inode.pino = dir_f->ino; raw_inode.version = 1; raw_inode.mode = dir_mode; - raw_inode.uid = current->fsuid; - raw_inode.gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; - /* raw_inode.gid = current->fsgid; */ + raw_inode.uid = tsk_fsuid(current); + raw_inode.gid = (dir->i_mode & S_ISGID) ? dir->i_gid : tsk_fsgid(current); + /* raw_inode.gid = tsk_fsgid(current); */ raw_inode.atime = get_seconds(); raw_inode.mtime = raw_inode.atime; raw_inode.ctime = raw_inode.atime; @@ -1031,8 +1031,8 @@ jffs_remove(struct inode *dir, struct de raw_inode.pino = del_f->pino; /* raw_inode.version = del_f->highest_version + 1; */ raw_inode.mode = del_f->mode; - raw_inode.uid = current->fsuid; - raw_inode.gid = current->fsgid; + raw_inode.uid = tsk_fsuid(current); + raw_inode.gid = tsk_fsgid(current); raw_inode.atime = get_seconds(); raw_inode.mtime = del_f->mtime; raw_inode.ctime = raw_inode.atime; @@ -1108,9 +1108,9 @@ jffs_mknod(struct inode *dir, struct den raw_inode.pino = dir_f->ino; raw_inode.version = 1; raw_inode.mode = mode; - raw_inode.uid = current->fsuid; - raw_inode.gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; - /* raw_inode.gid = current->fsgid; */ + raw_inode.uid = tsk_fsuid(current); + raw_inode.gid = (dir->i_mode & S_ISGID) ? dir->i_gid : tsk_fsgid(current); + /* raw_inode.gid = tsk_fsgid(current); */ raw_inode.atime = get_seconds(); raw_inode.mtime = raw_inode.atime; raw_inode.ctime = raw_inode.atime; @@ -1219,8 +1219,8 @@ jffs_symlink(struct inode *dir, struct d raw_inode.pino = dir_f->ino; raw_inode.version = 1; raw_inode.mode = S_IFLNK | S_IRWXUGO; - raw_inode.uid = current->fsuid; - raw_inode.gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; + raw_inode.uid = tsk_fsuid(current); + raw_inode.gid = (dir->i_mode & S_ISGID) ? dir->i_gid : tsk_fsgid(current); raw_inode.atime = get_seconds(); raw_inode.mtime = raw_inode.atime; raw_inode.ctime = raw_inode.atime; @@ -1322,8 +1322,8 @@ jffs_create(struct inode *dir, struct de raw_inode.pino = dir_f->ino; raw_inode.version = 1; raw_inode.mode = mode; - raw_inode.uid = current->fsuid; - raw_inode.gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; + raw_inode.uid = tsk_fsuid(current); + raw_inode.gid = (dir->i_mode & S_ISGID) ? dir->i_gid : tsk_fsgid(current); raw_inode.atime = get_seconds(); raw_inode.mtime = raw_inode.atime; raw_inode.ctime = raw_inode.atime; diff -puN net/ax25/ax25_route.c~d-task-xid-fixes net/ax25/ax25_route.c --- 25/net/ax25/ax25_route.c~d-task-xid-fixes 2003-09-28 16:47:28.000000000 -0700 +++ 25-akpm/net/ax25/ax25_route.c 2003-09-28 16:47:50.000000000 -0700 @@ -449,7 +449,7 @@ int ax25_rt_autobind(ax25_cb *ax25, ax25 goto put; } - if ((call = ax25_findbyuid(current->euid)) == NULL) { + if ((call = ax25_findbyuid(tsk_euid(current))) == NULL) { if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) { err = -EPERM; goto put; diff -puN fs/jffs2/fs.c~d-task-xid-fixes fs/jffs2/fs.c --- 25/fs/jffs2/fs.c~d-task-xid-fixes 2003-09-28 16:47:56.000000000 -0700 +++ 25-akpm/fs/jffs2/fs.c 2003-09-28 16:48:52.000000000 -0700 @@ -221,14 +221,14 @@ struct inode *jffs2_new_inode (struct in memset(ri, 0, sizeof(*ri)); /* Set OS-specific defaults for new inodes */ - ri->uid = cpu_to_je16(current->fsuid); + ri->uid = cpu_to_je16(tsk_fsuid(current)); if (dir_i->i_mode & S_ISGID) { ri->gid = cpu_to_je16(dir_i->i_gid); if (S_ISDIR(mode)) mode |= S_ISGID; } else { - ri->gid = cpu_to_je16(current->fsgid); + ri->gid = cpu_to_je16(tsk_fsgid(current)); } ri->mode = cpu_to_jemode(mode); ret = jffs2_do_new_inode (c, f, mode, ri); diff -puN drivers/net/wan/sbni.c~d-task-xid-fixes drivers/net/wan/sbni.c --- 25/drivers/net/wan/sbni.c~d-task-xid-fixes 2003-09-28 16:48:59.000000000 -0700 +++ 25-akpm/drivers/net/wan/sbni.c 2003-09-28 17:06:26.000000000 -0700 @@ -1309,7 +1309,7 @@ sbni_ioctl( struct net_device *dev, st break; case SIOCDEVRESINSTATS : - if( current->euid != 0 ) /* root only */ + if (tsk_euid(current) != 0 ) /* root only */ return -EPERM; memset( &nl->in_stats, 0, sizeof(struct sbni_in_stats) ); break; @@ -1329,7 +1329,7 @@ sbni_ioctl( struct net_device *dev, st break; case SIOCDEVSHWSTATE : - if( current->euid != 0 ) /* root only */ + if (tsk_euid(current) != 0 ) /* root only */ return -EPERM; spin_lock( &nl->lock ); @@ -1350,7 +1350,7 @@ sbni_ioctl( struct net_device *dev, st #ifdef CONFIG_SBNI_MULTILINE case SIOCDEVENSLAVE : - if( current->euid != 0 ) /* root only */ + if (tsk_euid(current) != 0 ) /* root only */ return -EPERM; if( (error = verify_area( VERIFY_READ, ifr->ifr_data, @@ -1369,7 +1369,7 @@ sbni_ioctl( struct net_device *dev, st return enslave( dev, slave_dev ); case SIOCDEVEMANSIPATE : - if( current->euid != 0 ) /* root only */ + if (tsk_euid(current) != 0 ) /* root only */ return -EPERM; return emancipate( dev ); diff -puN net/ax25/af_ax25.c~d-task-xid-fixes net/ax25/af_ax25.c --- 25/net/ax25/af_ax25.c~d-task-xid-fixes 2003-09-28 16:54:30.000000000 -0700 +++ 25-akpm/net/ax25/af_ax25.c 2003-09-28 16:54:53.000000000 -0700 @@ -1033,7 +1033,7 @@ static int ax25_bind(struct socket *sock if (addr->fsa_ax25.sax25_family != AF_AX25) return -EINVAL; - call = ax25_findbyuid(current->euid); + call = ax25_findbyuid(tsk_euid(current)); if (call == NULL && ax25_uid_policy && !capable(CAP_NET_ADMIN)) { return -EACCES; } diff -puN net/netrom/af_netrom.c~d-task-xid-fixes net/netrom/af_netrom.c --- 25/net/netrom/af_netrom.c~d-task-xid-fixes 2003-09-28 16:59:01.000000000 -0700 +++ 25-akpm/net/netrom/af_netrom.c 2003-09-28 16:59:34.000000000 -0700 @@ -594,7 +594,7 @@ static int nr_bind(struct socket *sock, } else { source = &addr->fsa_ax25.sax25_call; - if ((user = ax25_findbyuid(current->euid)) == NULL) { + if ((user = ax25_findbyuid(tsk_euid(current))) == NULL) { if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) { release_sock(sk); dev_put(dev); @@ -664,7 +664,7 @@ static int nr_connect(struct socket *soc } source = (ax25_address *)dev->dev_addr; - if ((user = ax25_findbyuid(current->euid)) == NULL) { + if ((user = ax25_findbyuid(tsk_euid(current))) == NULL) { if (ax25_uid_policy && !capable(CAP_NET_ADMIN)) { dev_put(dev); release_sock(sk); diff -puN net/rose/af_rose.c~d-task-xid-fixes net/rose/af_rose.c --- 25/net/rose/af_rose.c~d-task-xid-fixes 2003-09-28 17:02:12.000000000 -0700 +++ 25-akpm/net/rose/af_rose.c 2003-09-28 17:02:38.000000000 -0700 @@ -670,7 +670,7 @@ static int rose_bind(struct socket *sock source = &addr->srose_call; - if ((user = ax25_findbyuid(current->euid)) == NULL) { + if ((user = ax25_findbyuid(tsk_euid(current))) == NULL) { if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) return -EACCES; user = source; @@ -755,7 +755,7 @@ static int rose_connect(struct socket *s if ((dev = rose_dev_first()) == NULL) return -ENETUNREACH; - if ((user = ax25_findbyuid(current->euid)) == NULL) + if ((user = ax25_findbyuid(tsk_euid(current))) == NULL) return -EINVAL; memcpy(&rose->source_addr, dev->dev_addr, ROSE_ADDR_LEN); _