diff options
Diffstat (limited to 'usr/src/lib/libbc/libc')
-rw-r--r-- | usr/src/lib/libbc/libc/sys/4.2/chmod.c | 20 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/4.2/link.c | 18 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/4.2/mkdir.c | 18 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/4.2/mknod.c | 16 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/4.2/readlink.c | 16 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/4.2/symlink.c | 18 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/common/syscall.c | 21 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/sys5/chmod.c | 16 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/sys5/link.c | 14 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/sys5/mkdir.c | 16 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/sys5/readlink.c | 14 | ||||
-rw-r--r-- | usr/src/lib/libbc/libc/sys/sys5/symlink.c | 14 |
12 files changed, 91 insertions, 110 deletions
diff --git a/usr/src/lib/libbc/libc/sys/4.2/chmod.c b/usr/src/lib/libbc/libc/sys/4.2/chmod.c index f5992d7a00..ea98fb387a 100644 --- a/usr/src/lib/libbc/libc/sys/4.2/chmod.c +++ b/usr/src/lib/libbc/libc/sys/4.2/chmod.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - -# include "chkpath.h" +#include "chkpath.h" +#include <sys/fcntl.h> int -chmod(char *s, int m) +chmod(char *s, mode_t m) { - CHKNULL(s); - return (_syscall(SYS_chmod, s, m)); + CHKNULL(s); + return (_syscall(SYS_fchmodat, AT_FDCWD, s, m, 0)); } diff --git a/usr/src/lib/libbc/libc/sys/4.2/link.c b/usr/src/lib/libbc/libc/sys/4.2/link.c index 8b060e4774..a48eca7975 100644 --- a/usr/src/lib/libbc/libc/sys/4.2/link.c +++ b/usr/src/lib/libbc/libc/sys/4.2/link.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "chkpath.h" +#include <sys/fcntl.h> int link(char *a, char *b) { - CHKNULL(a); - CHKNULL(b); - return (_syscall(SYS_link, a, b)); + CHKNULL(a); + CHKNULL(b); + return (_syscall(SYS_linkat, AT_FDCWD, a, AT_FDCWD, b, 0)); } diff --git a/usr/src/lib/libbc/libc/sys/4.2/mkdir.c b/usr/src/lib/libbc/libc/sys/4.2/mkdir.c index 97925363e1..23bed9c6c0 100644 --- a/usr/src/lib/libbc/libc/sys/4.2/mkdir.c +++ b/usr/src/lib/libbc/libc/sys/4.2/mkdir.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "chkpath.h" +#include <sys/fcntl.h> int -mkdir(char *p, int m) +mkdir(char *p, mode_t m) { - CHKNULL(p); - return (_syscall(SYS_mkdir, p, m)); + CHKNULL(p); + return (_syscall(SYS_mkdirat, AT_FDCWD, p, m)); } diff --git a/usr/src/lib/libbc/libc/sys/4.2/mknod.c b/usr/src/lib/libbc/libc/sys/4.2/mknod.c index f69c4d6d2c..b06033270d 100644 --- a/usr/src/lib/libbc/libc/sys/4.2/mknod.c +++ b/usr/src/lib/libbc/libc/sys/4.2/mknod.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "chkpath.h" +#include <sys/fcntl.h> int mknod(char *p, int m, int d) { - CHKNULL(p); - return (_syscall(SYS_mknod, p, m, d)); + CHKNULL(p); + return (_syscall(SYS_mknodat, AT_FDCWD, p, m, d)); } diff --git a/usr/src/lib/libbc/libc/sys/4.2/readlink.c b/usr/src/lib/libbc/libc/sys/4.2/readlink.c index ff8f566f23..4c24ef8f75 100644 --- a/usr/src/lib/libbc/libc/sys/4.2/readlink.c +++ b/usr/src/lib/libbc/libc/sys/4.2/readlink.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "chkpath.h" +#include <sys/fcntl.h> int readlink(char *p, char *b, int s) { - CHKNULL(p); - return (_syscall(SYS_readlink, p, b, s)); + CHKNULL(p); + return (_syscall(SYS_readlinkat, AT_FDCWD, p, b, s)); } diff --git a/usr/src/lib/libbc/libc/sys/4.2/symlink.c b/usr/src/lib/libbc/libc/sys/4.2/symlink.c index c9bf39cc17..622832a703 100644 --- a/usr/src/lib/libbc/libc/sys/4.2/symlink.c +++ b/usr/src/lib/libbc/libc/sys/4.2/symlink.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "chkpath.h" +#include <sys/fcntl.h> int symlink(char *t, char *f) { - CHKNULL(t); - CHKNULL(f); - return (_syscall(SYS_symlink, t, f)); + CHKNULL(t); + CHKNULL(f); + return (_syscall(SYS_symlinkat, t, AT_FDCWD, f)); } diff --git a/usr/src/lib/libbc/libc/sys/common/syscall.c b/usr/src/lib/libbc/libc/sys/common/syscall.c index 83079878f8..945143e40e 100644 --- a/usr/src/lib/libbc/libc/sys/common/syscall.c +++ b/usr/src/lib/libbc/libc/sys/common/syscall.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <errno.h> @@ -37,9 +36,9 @@ int syscallnum[190] = { SYS_syscall, SYS_exit, -1 /*fork1*/, SYS_read, SYS_write, -1 /*open*/, SYS_close, - -1, -1 /*creat*/, SYS_link, -1 /*unlink*/, - -1, SYS_chdir, 0, SYS_mknod, - SYS_chmod, -1 /*lchown*/, 0, 0, + -1, -1 /*creat*/, -1 /*link*/, -1 /*unlink*/, + -1, SYS_chdir, 0, -1 /*mknod*/, + -1 /*chmod*/, -1 /*lchown*/, 0, 0, SYS_lseek, SYS_getpid, 0, 0, 0, SYS_getuid, 0, 0, 0, 0, 0, 0, @@ -49,7 +48,7 @@ int syscallnum[190] = { SYS_syscall, SYS_exit, -1 /*fork1*/, 0, SYS_profil, 0, 0, SYS_getgid, 0, 0, 0, SYS_acct, 0, -1, SYS_ioctl, - -1 /*reboot*/, 0, SYS_symlink, SYS_readlink, + -1 /*reboot*/, 0, -1 /*symlink*/, -1 /*readlink*/, SYS_execve, SYS_umask, SYS_chroot, -1 /*fstat*/, 0, -1/*getpagesize*/,-1, 0, 0, 0, -1, -1, @@ -66,10 +65,10 @@ int syscallnum[190] = { SYS_syscall, SYS_exit, -1 /*fork1*/, -1 /*sigpause*/, -1 /*sigstack*/, -1 /*recvmsg*/, -1 /*sendmsg*/, -1 /*vtrace*/, SYS_gettimeofday, -1 /*getrusage*/, -1 /*getsockopt*/, 0, SYS_readv, SYS_writev, -1 /*settimeofday*/, - -1 /*fchown*/, SYS_fchmod, -1 /*recvfrom*/, -1 /*setreuid*/, + -1 /*fchown*/, -1 /*fchmod*/, -1 /*recvfrom*/, -1 /*setreuid*/, -1 /*getregid*/, -1 /*rename*/, -1 /*truncate*/, -1 /*ftruncate*/, -1 /*flock*/, 0, -1 /*sendto*/, -1 /*shutdown*/, - -1 /*socketpair*/,SYS_mkdir, -1 /*rmdir*/, -1 /*utimes*/, + -1 /*socketpair*/, -1 /*mkdir*/, -1 /*rmdir*/, -1 /*utimes*/, 0, SYS_adjtime, -1 /*getpeername*/,-1 /*gethostid*/, 0, SYS_getrlimit, SYS_setrlimit, -1 /*killpg*/, 0, 0, 0, -1/*getsockname*/, @@ -474,6 +473,11 @@ syscall(int sysnum, ...) i3 = va_arg(ap, int); va_end(ap); return (poll(c1, i2, i3)); + case XSYS_fchmod: + i1 = va_arg(ap, int); + i2 = va_arg(ap, int); + va_end(ap); + return (fchmod(i1, i2)); case XSYS_fchown: i1 = va_arg(ap, int); i2 = va_arg(ap, int); @@ -616,7 +620,6 @@ syscall(int sysnum, ...) case XSYS_adjtime: case XSYS_exit: case XSYS_fchdir: - case XSYS_fchmod: case XSYS_fchroot: case XSYS_getgid: case XSYS_getitimer: diff --git a/usr/src/lib/libbc/libc/sys/sys5/chmod.c b/usr/src/lib/libbc/libc/sys/sys5/chmod.c index 0116dc7aab..32840d46fb 100644 --- a/usr/src/lib/libbc/libc/sys/sys5/chmod.c +++ b/usr/src/lib/libbc/libc/sys/sys5/chmod.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/syscall.h> +#include <sys/fcntl.h> int -chmod(char *s, int m) +chmod(char *s, mode_t m) { - return (_syscall(SYS_chmod, s, m)); + return (_syscall(SYS_fchmodat, AT_FDCWD, s, m, 0)); } diff --git a/usr/src/lib/libbc/libc/sys/sys5/link.c b/usr/src/lib/libbc/libc/sys/sys5/link.c index 5025510281..85ecd49af3 100644 --- a/usr/src/lib/libbc/libc/sys/sys5/link.c +++ b/usr/src/lib/libbc/libc/sys/sys5/link.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/syscall.h> +#include <sys/fcntl.h> int link(char *a, char *b) { - return (_syscall(SYS_link, a, b)); + return (_syscall(SYS_linkat, AT_FDCWD, a, AT_FDCWD, b, 0)); } diff --git a/usr/src/lib/libbc/libc/sys/sys5/mkdir.c b/usr/src/lib/libbc/libc/sys/sys5/mkdir.c index 87fa580398..5f0c8106ea 100644 --- a/usr/src/lib/libbc/libc/sys/sys5/mkdir.c +++ b/usr/src/lib/libbc/libc/sys/sys5/mkdir.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/syscall.h> +#include <sys/fcntl.h> int -mkdir(char *p, int m) +mkdir(char *p, mode_t m) { - return (_syscall(SYS_mkdir, p, m)); + return (_syscall(SYS_mkdirat, AT_FDCWD, p, m)); } diff --git a/usr/src/lib/libbc/libc/sys/sys5/readlink.c b/usr/src/lib/libbc/libc/sys/sys5/readlink.c index 48e3a692be..9007d4065a 100644 --- a/usr/src/lib/libbc/libc/sys/sys5/readlink.c +++ b/usr/src/lib/libbc/libc/sys/sys5/readlink.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/syscall.h> +#include <sys/fcntl.h> int readlink(char *p, char *b, int s) { - return (_syscall(SYS_readlink, p, b, s)); + return (_syscall(SYS_readlinkat, AT_FDCWD, p, b, s)); } diff --git a/usr/src/lib/libbc/libc/sys/sys5/symlink.c b/usr/src/lib/libbc/libc/sys/sys5/symlink.c index 666b3b44e2..cf96a6cbd6 100644 --- a/usr/src/lib/libbc/libc/sys/sys5/symlink.c +++ b/usr/src/lib/libbc/libc/sys/sys5/symlink.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/syscall.h> +#include <sys/fcntl.h> int symlink(char *t, char *f) { - return (_syscall(SYS_symlink, t, f)); + return (_syscall(SYS_symlinkat, t, AT_FDCWD, f)); } |