/*
*
* 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.
*/
---
+
#
-xscreensaver: $(SAVER_OBJS)
+ $(TRUSTED_OBJS) $(TRUSTED_LIBS) \
$(XDPMS_LIBS) -lXext \
$(X_EXTRA_LIBS)
@@ -137,6 +137,14 @@
+
+#include "trusted-utils.h"
+
enum {
+ if (tsol_multi_label_session)
+ {
+ static int idletime = 0;
+ if (!tsol_hack_initialized)
+ {
+ _("_Lock Screen After"),
+ "use-underline", TRUE,
+ "mnemonic-widget", lock_spinbutton,
+ NULL);
+ GtkAdjustment *adj;
+ userattr_t *uent;
+
+
+
+ {
+ if (idletime)
+ {
+ }
+ }
+
+ gtk_container_child_set_property(GTK_CONTAINER(lock_container), GTK_WIDGET(newlabel), "top_attach", gv);
+ gtk_container_child_set_property(GTK_CONTAINER(lock_container), GTK_WIDGET(newlabel), "left_attach", gv);
+
+ }
+
+ if (idletime)
+ {
+ }
+ }
+
}
}
{
+ if (tsol_is_multi_label_session() && 2==i)
+ continue;
+
}
@@ -72,6 +72,7 @@
#include "remote.h"
#include "atoms.h"
+#include "trusted-utils.h"
const char *logofile;
+ if (tsol_is_multi_label_session())
+ else
{
@@ -37,6 +37,8 @@
# include "vms-pwd.h"
#endif /* VMS */
+#include "trusted-utils.h"
/* This file doesn't need the Xt headers, so stub these types out... */
@@ -67,6 +69,9 @@
#include "prefs.h"
#include "resources.h"
+#include "trusted-utils.h"
+
/* don't use realpath() on fedora system */
+ if (tsol_is_multi_label_session())
+ else
+
/* bugid 5077981 */
if (s) free (s);
}
+ if (tsol_is_multi_label_session())
+ {
+ userattr_t *uent;
+ int idletime;
+
+ {
+ if (idletime)
+ {
+ p->lock_timeout = 0;
+ }
+ }
+
+ /* always lock or logout in a Multi Label Session */
+ if (p->mode == DONT_BLANK)
+ p->mode = BLANK_ONLY;
+
+ p->lock_cmd = LOGOUT_CMD;
+ else
+ }
+
if (system_default_screenhack_count) /* note: first_time is also true */
{
#include "exec.h"
#include "yarandom.h"
+#include "trusted-utils.h"
}
}
+/* Added separate function for logout as we need to find better way to log user
+ out. See CR6422890. For s10 we will use /usr/bin/gnome-session-save --kill
+*/
+void
+{
+ {
+ {
+ if (forked < 1)
+ {
+ char buf [255];
+ }
+ }
+ }
+}
+
void
{
@@ -0,0 +1,171 @@
+/*
+ * Trusted xscreensaver
+ *
+ *
+ * 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.
+ *
+ *
+ * Based on work by Erwann Chenede, Ghee Teo
+ *
+ * Used to check if we are in a multilabel session and to load
+ * additional functionality within the multilabel session.
+ */
+#include <sys/types.h>
+#include "trusted-utils.h"
+
+/*
+ * Checks for Multi label session
+ */
+tsol_is_multi_label_session (void)
+{
+
+ if (!session)
+
+ if (!session)
+ return FALSE;
+
+ return TRUE;
+}
+
+/*
+ * dynamicly load the libxtsol library
+ */
+static
+void * dlopen_xtsol (void)
+{
+
+ return handle;
+ return handle;
+
+ return handle;
+}
+
+/*
+ * dynamicly load the libDtTsol library
+ */
+static
+void * dlopen_gnometsol (void)
+{
+
+ return handle;
+
+ return handle;
+}
+
+
+void
+{
+
+ if ( ! _xtsol_initialized )
+ {
+ _xtsol_initialized = TRUE;
+ xtsol_handle = dlopen_xtsol ();
+ if (xtsol_handle != NULL)
+ "XTSOLgetWorkstationOwner");
+ }
+
+ if (libxtsol_XTSOLgetWorkstationOwner == NULL)
+ *WorkstationOwner = getuid();
+ else
+}
+
+
+void
+{
+
+ if ( ! _xtsol_initialized )
+ {
+ _xtsol_initialized = TRUE;
+ xtsol_handle = dlopen_xtsol ();
+ if (xtsol_handle != NULL)
+ "XTSOLMakeTPWindow");
+ }
+
+ if (libxtsol_XTSOLMakeTPWindow)
+ {
+ libxtsol_XTSOLMakeTPWindow(dpy, w);
+ }
+}
+
+
+/*
+ * Returns a value from uattr for the given key.
+ * If there is no value in user_attr, then it returns the
+ * system wide default from policy.conf or labelencodings
+ * as appropriate.
+ */
+char *
+{
+ char *value;
+
+ if ( ! _gnometsol_initialized )
+ {
+ gnometsol_handle = dlopen_gnometsol ();
+ if (gnometsol_handle != NULL)
+ "gnome_tsol_get_usrattr_val");
+ }
+
+ if (libgnome_tsol_get_usrattr_val == NULL)
+ {
+ } else
+
+ return ( value );
+}
@@ -0,0 +1,54 @@
+/*
+ * Trusted xscreensaver
+ *
+ *
+ * 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.
+ *
+ * Based on work by Erwann Chenede, Ghee Teo
+ *
+ * Definitions for the trusted functions.
+ */
+
+#endif /* HAVE_XTSOL */
+#include <X11/Xlib.h>
+#include <sys/types.h>
+
+
+
+enum {
+ LOCK_CMD = 0,
+};
+#endif /* TRUSTED_XSCREENSAVER_H */
+ int lock_cmd; /* tsol only - whether to lock or logout */
+
diff --git xscreensaver-5.12/driver/xscreensaver-getimage.c xscreensaver-5.12/driver/xscreensaver-getimage.c
0
};
char *progname = 0;
@@ -142,6 +142,7 @@
@@ -229,6 +230,9 @@
#include "auth.h"
#include "atoms.h"
+#include "trusted-utils.h"
+
/* Globals */
+ if (tsol_is_multi_label_session())
+
if (p->mode == DONT_BLANK)
{
if (p->verbose_p)
int i;
+ exit (1);
+
# endif /* !NO_LOCKING */
print_banner (si);
const char *cmd);
+
/* =======================================================================
subprocs diagnostics
======================================================================= */