Check-in [f4e6b62dfb]
Overview
SHA1:f4e6b62dfb27d26514b467846f5451d5eceef0ec
Date: 2014-11-10 05:02:18
User: rkeene
Comment:Minor re-ordering so that FUSE things can be "near" each other
Timelines: family | ancestors | descendants | both | tcl-ops
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2014-11-10
05:30
[9562d42ae1] Simplified user fsuid switching (user: rkeene, tags: tcl-ops)
05:02
[f4e6b62dfb] Minor re-ordering so that FUSE things can be "near" each other (user: rkeene, tags: tcl-ops)
04:52
[9279433b2f] Added initial PKI support (user: rkeene, tags: tcl-ops)
Changes

Modified appfsd.c from [423ee145a2] to [405b834b47].

  1319   1319   	 * Tcl mode, for running raw Tcl in the same environment AppFSd would
  1320   1320   	 * run code.
  1321   1321   	 */
  1322   1322   	if (argc == 2 && strcmp(argv[0], "--tcl") == 0) {
  1323   1323   		return(appfs_tcl(argv[1]));
  1324   1324   	}
  1325   1325   
  1326         -	/*
  1327         -	 * Add FUSE arguments which we always supply
  1328         -	 */
  1329         -	fuse_opt_parse(&args, NULL, NULL, appfs_fuse_opt_cb);
  1330         -	fuse_opt_add_arg(&args, "-odefault_permissions,fsname=appfs,subtype=appfsd,use_ino,kernel_cache,entry_timeout=60,attr_timeout=3600,intr,big_writes");
  1331         -
  1332         -	if (getuid() == 0) {
  1333         -		fuse_opt_parse(&args, NULL, NULL, NULL);
  1334         -		fuse_opt_add_arg(&args, "-oallow_other");
  1335         -	}
  1336         -
  1337   1326   	/*
  1338   1327   	 * Create a Tcl interpreter just to verify that things are in working 
  1339   1328   	 * order before we become a daemon.
  1340   1329   	 */
  1341   1330   	test_interp = appfs_create_TclInterp(&test_interp_error);
  1342   1331   	if (test_interp == NULL) {
  1343   1332   		if (test_interp_error == NULL) {
................................................................................
  1346   1335   
  1347   1336   		fprintf(stderr, "Unable to initialize Tcl interpreter for AppFSd:\n");
  1348   1337   		fprintf(stderr, "%s\n", test_interp_error);
  1349   1338   
  1350   1339   		return(1);
  1351   1340   	}
  1352   1341   	Tcl_DeleteInterp(test_interp);
         1342  +
         1343  +	/*
         1344  +	 * Add FUSE arguments which we always supply
         1345  +	 */
         1346  +	fuse_opt_parse(&args, NULL, NULL, appfs_fuse_opt_cb);
         1347  +	fuse_opt_add_arg(&args, "-odefault_permissions,fsname=appfs,subtype=appfsd,use_ino,kernel_cache,entry_timeout=60,attr_timeout=3600,intr,big_writes");
         1348  +
         1349  +	if (getuid() == 0) {
         1350  +		fuse_opt_parse(&args, NULL, NULL, NULL);
         1351  +		fuse_opt_add_arg(&args, "-oallow_other");
         1352  +	}
  1353   1353   
  1354   1354   	/*
  1355   1355   	 * Enter the FUSE main loop -- this will process any arguments
  1356   1356   	 * and start servicing requests.
  1357   1357   	 */
  1358   1358   	appfs_fuse_started = 1;
  1359   1359   	return(fuse_main(args.argc, args.argv, &appfs_operations, NULL));
  1360   1360   }
  1361   1361