- /* Here is the first initializaton point of parent in sandboxed mode. */
- if (!options->debug_messages) {
- g_log_set_handler(
- G_LOG_DOMAIN, /* log_domain; "Captive" */
- 0 /* log_levels */
- | G_LOG_FLAG_RECURSION
- | G_LOG_FLAG_FATAL
- /* The same mask is in:
- * libcaptive/sandbox/server-GLogFunc.c
- * libcaptive/client/init.c
- * libcaptive/client/vfs.c
- */
- | G_LOG_LEVEL_MESSAGE
- | G_LOG_LEVEL_INFO
- | G_LOG_LEVEL_DEBUG,
- log_discard_func, /* log_func */
- NULL); /* user_data */
+#ifndef MAINTAINER_MODE
+ /* We are not sandboxing || we are the master */
+ if (!options->sandbox || (options->sandbox_server_argv || options->sandbox_server_ior)) {
+int fd;
+
+ /* Shameless advertisement: */
+ for (fd=2 /* STDERR */;fd>=1 /* STDOUT */;fd--) {
+ if (isatty(fd)) {
+const gchar *msg="Captive NTFS v" VERSION ". Check a new version at: http://www.jankratochvil.net/\n";
+
+ /* Prevent: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result */
+ if (strlen(msg)==write(fd,msg,strlen(msg)))
+ break;
+ }
+ }