.B wmnotify
reads your mail account settings and preferences from the specified
configuration file. This option overrides the use of the default config file,
-.IR "$HOME/.wmnotifyrc".
+.IR "$HOME/.wmnotifyrc". Make sure that the alternate configuration file has
+correct permissions (normally 0400) to protect your email account informations.
.TP
\fB\-d\fR
#include <unistd.h>
#include <stdio.h>
+#include <sys/stat.h>
#include <stdlib.h>
#if STDC_HEADERS
fprintf( stderr, "%s: Can't create file \"%s\"\n", PACKAGE, file );
exit( EXIT_FAILURE );
}
-
+
+ /* Changing permissions so that only the user can read/modify the file. */
+ status = chmod( file, S_IRUSR | S_IWUSR );
+ if( status < 0 ) {
+ fprintf( stderr, "%s: Can't set permission bits on file \"%s\"\n", PACKAGE, file );
+ exit( EXIT_FAILURE );
+ }
+
fprintf( fp, "# ~/.wmnotifyrc -- Default configuration file for wmnotify\n\n" );
fprintf( fp, "# Replace all 'xxxxxxxx' fields with your own settings.\n\n" );
fprintf( fp, "# Parameters preceded by a '#' character are optional.\n" );