The linux chown syscall is more like lchown, a new chown syscall that
follows links was added.
This commit is contained in:
parent
1e38714ba8
commit
3f4ac65efc
@ -1,4 +1,4 @@
|
||||
$Id: syscalls.master,v 1.8 1998/03/29 06:35:22 peter Exp $
|
||||
$Id: syscalls.master,v 1.9 1998/03/29 07:53:19 peter Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
; System call name/number master file (or rather, slave, from LINUX).
|
||||
@ -47,8 +47,7 @@
|
||||
13 STD LINUX { int linux_time(linux_time_t *tm); }
|
||||
14 STD LINUX { int linux_mknod(char *path, int mode, int dev); }
|
||||
15 STD LINUX { int linux_chmod(char *path, int mode); }
|
||||
; XXX linux_chown is really meant to be linux_lchown
|
||||
16 STD LINUX { int linux_chown(char *path, int uid, int gid); }
|
||||
16 STD LINUX { int linux_lchown(char *path, int uid, int gid); }
|
||||
17 STD LINUX { int linux_break(char *nsize); }
|
||||
18 STD LINUX { int linux_stat(char *path, struct ostat *up); }
|
||||
19 STD LINUX { int linux_lseek(int fdes, long off, int whence); }
|
||||
@ -253,4 +252,4 @@
|
||||
179 UNIMPL LINUX rt_sigsuspend
|
||||
180 UNIMPL LINUX pread
|
||||
181 UNIMPL LINUX pwrite
|
||||
182 UNIMPL LINUX chown
|
||||
182 STD LINUX { int linux_chown(char *path, int uid, int gid); }
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_file.c,v 1.18 1998/01/05 01:05:15 jmb Exp $
|
||||
* $Id: linux_file.c,v 1.19 1998/01/05 01:17:42 jmb Exp $
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
@ -668,6 +668,27 @@ linux_chown(struct proc *p, struct linux_chown_args *args)
|
||||
return chown(p, &bsd);
|
||||
}
|
||||
|
||||
int
|
||||
linux_lchown(struct proc *p, struct linux_lchown_args *args)
|
||||
{
|
||||
struct lchown_args bsd;
|
||||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init();
|
||||
CHECKALTEXIST(p, &sg, args->path);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Linux-emul(%d): lchown(%s, %d, %d)\n",
|
||||
p->p_pid, args->path, args->uid, args->gid);
|
||||
#endif
|
||||
bsd.path = args->path;
|
||||
/* XXX size casts here */
|
||||
bsd.uid = args->uid;
|
||||
bsd.gid = args->gid;
|
||||
|
||||
return lchown(p, &bsd);
|
||||
}
|
||||
|
||||
int
|
||||
linux_mkdir(struct proc *p, struct linux_mkdir_args *args)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_file.c,v 1.18 1998/01/05 01:05:15 jmb Exp $
|
||||
* $Id: linux_file.c,v 1.19 1998/01/05 01:17:42 jmb Exp $
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
@ -668,6 +668,27 @@ linux_chown(struct proc *p, struct linux_chown_args *args)
|
||||
return chown(p, &bsd);
|
||||
}
|
||||
|
||||
int
|
||||
linux_lchown(struct proc *p, struct linux_lchown_args *args)
|
||||
{
|
||||
struct lchown_args bsd;
|
||||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init();
|
||||
CHECKALTEXIST(p, &sg, args->path);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Linux-emul(%d): lchown(%s, %d, %d)\n",
|
||||
p->p_pid, args->path, args->uid, args->gid);
|
||||
#endif
|
||||
bsd.path = args->path;
|
||||
/* XXX size casts here */
|
||||
bsd.uid = args->uid;
|
||||
bsd.gid = args->gid;
|
||||
|
||||
return lchown(p, &bsd);
|
||||
}
|
||||
|
||||
int
|
||||
linux_mkdir(struct proc *p, struct linux_mkdir_args *args)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
$Id: syscalls.master,v 1.8 1998/03/29 06:35:22 peter Exp $
|
||||
$Id: syscalls.master,v 1.9 1998/03/29 07:53:19 peter Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
; System call name/number master file (or rather, slave, from LINUX).
|
||||
@ -47,8 +47,7 @@
|
||||
13 STD LINUX { int linux_time(linux_time_t *tm); }
|
||||
14 STD LINUX { int linux_mknod(char *path, int mode, int dev); }
|
||||
15 STD LINUX { int linux_chmod(char *path, int mode); }
|
||||
; XXX linux_chown is really meant to be linux_lchown
|
||||
16 STD LINUX { int linux_chown(char *path, int uid, int gid); }
|
||||
16 STD LINUX { int linux_lchown(char *path, int uid, int gid); }
|
||||
17 STD LINUX { int linux_break(char *nsize); }
|
||||
18 STD LINUX { int linux_stat(char *path, struct ostat *up); }
|
||||
19 STD LINUX { int linux_lseek(int fdes, long off, int whence); }
|
||||
@ -253,4 +252,4 @@
|
||||
179 UNIMPL LINUX rt_sigsuspend
|
||||
180 UNIMPL LINUX pread
|
||||
181 UNIMPL LINUX pwrite
|
||||
182 UNIMPL LINUX chown
|
||||
182 STD LINUX { int linux_chown(char *path, int uid, int gid); }
|
||||
|
Loading…
Reference in New Issue
Block a user