aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt5
-rw-r--r--Futures.txt5
-rw-r--r--Makefile.in4
-rw-r--r--ports/unix/guts/linkat.c14
4 files changed, 15 insertions, 13 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index e930b08..8f52cc9 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,8 @@
+2013-02-13:
+ * (seebs) calling link while chrooted could in some cases result
+ in the root path not being prepended at all. One more try!
+ * (seebs) 1.4.5.
+
2013-02-12:
* (seebs) calling link while chrooted could in some cases result
in the root path being double-appended.
diff --git a/Futures.txt b/Futures.txt
index e7829ce..7a39fab 100644
--- a/Futures.txt
+++ b/Futures.txt
@@ -33,3 +33,8 @@ vague implementation thoughts:
* Test cases
- boy, do we need test cases!
+
+* Clean up *at() functions
+ - The *at() function implementations are gratuitously complicated,
+ I believe because they predate the auto-canonicalization that came
+ with the rewritten pseudo wrappers.
diff --git a/Makefile.in b/Makefile.in
index 0552d35..e0cd7a9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
#
# Makefile.in/Makefile, build rules for pseudo
#
-# Copyright (c) 2008-2012 Wind River Systems, Inc.
+# Copyright (c) 2008-2013 Wind River Systems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the Lesser GNU General Public License version 2.1 as
@@ -27,7 +27,7 @@ BITS=@BITS@
ARCH_FLAGS=@ARCH_FLAGS@
MARK64=@MARK64@
RPATH=@RPATH@
-VERSION=1.4.4
+VERSION=1.4.5
LIB=@LIB@
BIN=bin
diff --git a/ports/unix/guts/linkat.c b/ports/unix/guts/linkat.c
index 3d0f99a..9ca7c47 100644
--- a/ports/unix/guts/linkat.c
+++ b/ports/unix/guts/linkat.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 Wind River Systems; see
+ * Copyright (c) 2012, 2013 Wind River Systems; see
* guts/COPYRIGHT for information.
*
* int linkat(int olddirfd, const char *oldname, int newdirfd, const char *newname, int flags)
@@ -31,24 +31,17 @@
errno = ENOSYS;
return -1;
}
+#endif
oldpath = pseudo_root_path(__func__, __LINE__, olddirfd, oldname, rflags);
newpath = pseudo_root_path(__func__, __LINE__, newdirfd, newname, AT_SYMLINK_NOFOLLOW);
rc = real_link(oldpath, newpath);
+ save_errno = errno;
if (rc == -1) {
- save_errno = errno;
free(oldpath);
free(newpath);
errno = save_errno;
return rc;
}
-#else
- rc = real_linkat(olddirfd, oldname, newdirfd, newname, flags);
- if (rc == -1) {
- return rc;
- }
- oldpath = pseudo_root_path(__func__, __LINE__, olddirfd, oldname, rflags);
- newpath = pseudo_root_path(__func__, __LINE__, newdirfd, newname, AT_SYMLINK_NOFOLLOW);
-#endif
/* if we got this far, the link succeeded, and oldpath and newpath
* are the newly-allocated canonical paths. If OS, filesystem, or
@@ -74,7 +67,6 @@
*/
pseudo_client_op(OP_LINK, 0, -1, -1, newpath, &buf);
- save_errno = errno;
free(oldpath);
free(newpath);
errno = save_errno;