aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2013-04-15 12:36:37 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2013-04-15 12:36:37 +0000
commitad68ae150f17cf6e0b2c605c9331cf0aedfce1d0 (patch)
tree9079e9ce1b942683e45f2f5212fe2f9ce1bd5d56 /src/include
parentfbda84a3f00a667f4b149f00f9a7d330e5db54a8 (diff)
downloadgnunet-ad68ae150f17cf6e0b2c605c9331cf0aedfce1d0.tar.gz
gnunet-ad68ae150f17cf6e0b2c605c9331cf0aedfce1d0.zip
extended the GNUNET_OS_check_helper_binary parameters to do previlege
checking in windows. To do so, tested binaries must still be supplied with valid commandline arguments, but on windows gnunet will utilize the -d flag to run the programs initialization phase or privileged operations only. In these modes, a program will not enter its mainloop or communicate with the outside. updated relevant function calls gnunet-wide to meet the extended function parameters.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_os_lib.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h
index e4bbab8a9..425c565ba 100644
--- a/src/include/gnunet_os_lib.h
+++ b/src/include/gnunet_os_lib.h
@@ -483,13 +483,19 @@ GNUNET_OS_install_parent_control_handler (void *cls,
483 * Attempts to find the file using the current 483 * Attempts to find the file using the current
484 * PATH environment variable as a search path. 484 * PATH environment variable as a search path.
485 * 485 *
486 * @param binary the name of the file to check 486 * @param binary the name of the file to check.
487 * @return GNUNET_YES if the file is SUID, 487 * W32: must not have an .exe suffix.
488 * GNUNET_NO if not SUID (but binary exists) 488 * @param check_suid input true if the binary should be checked for SUID (*nix)
489 * W32: checks if the program has sufficient privileges by executing this
490 * binary with the -d flag. -d omits a programs main loop and only
491 * executes all privileged operations in an binary.
492 * @param params parameters used for w32 privilege checking (can be NULL for != w32, or when not checking for suid/permissions )
493 * @return GNUNET_YES if the file is SUID (*nix) or can be executed with current privileges (W32),
494 * GNUNET_NO if not SUID (but binary exists),
489 * GNUNET_SYSERR on error (no such binary or not executable) 495 * GNUNET_SYSERR on error (no such binary or not executable)
490 */ 496 */
491int 497int
492GNUNET_OS_check_helper_binary (const char *binary); 498GNUNET_OS_check_helper_binary (const char *binary, const boolean check_suid, const char * params);
493 499
494 500
495#if 0 /* keep Emacsens' auto-indent happy */ 501#if 0 /* keep Emacsens' auto-indent happy */