summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-03-29 07:59:10 +0000
committerpeter <peter@FreeBSD.org>1998-03-29 07:59:10 +0000
commita9835c646b8e7594c69b589cf0cae602441a2245 (patch)
tree1399851e9efafcf8f74eb721e601fb895c094109 /sys/compat
parentb85f6e213bf5e290f8e6487e4c0aed437b9792de (diff)
downloadFreeBSD-src-a9835c646b8e7594c69b589cf0cae602441a2245.zip
FreeBSD-src-a9835c646b8e7594c69b589cf0cae602441a2245.tar.gz
The linux chown syscall is more like lchown, a new chown syscall that
follows links was added.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_file.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index f792a37..32d7cbe 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -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"
@@ -669,6 +669,27 @@ linux_chown(struct proc *p, struct linux_chown_args *args)
}
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)
{
struct mkdir_args bsd;
OpenPOWER on IntegriCloud