/*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/
--- a/Xtranssock.c
+++ b/Xtranssock.c
+#include <tsol/label.h>
+#endif /* X11_t */
#endif /* X11_t */
#else
mode = 0777;
+
+ if (is_system_labeled()) {
+
+ TSOL_UNIX_DIR, errno);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ /* Create a symlink for UNIX_DIR to TSOL_UNIX_DIR */
+ prmsg (1,
+ "SocketUNIXCreateListener: symlink to %s failed, errno = %d\n",
+ TSOL_UNIX_DIR, errno);
+ return TRANS_CREATE_LISTENER_FAILED;
+ }
+
+ } else
+#endif /* X11_t */
return TRANS_CONNECT_FAILED;
}
+ /*
+ * Create a symlink for UNIX_DIR to TSOL_UNIX_DIR
+ * This link is created in the labeled (non-global) zones.
+ * The rendezvous created by the X server resides in the global zone
+ * and is mounted read-only to other zones.
+ */
+ if (is_system_labeled()) {
+
+ TSOL_UNIX_DIR, errno);
+ return TRANS_CONNECT_FAILED;
+ }
+ }
+#endif /* X11_t */
+
/*
* Build the socket name.
*/