int check_can_drop_all_groups() {
	static int can_drop_all_groups = -1;

	// Avoid needlessly checking (and printing) things twice
	if (can_drop_all_groups != -1)
		goto out;

	// nvidia cards require video group; ignore nogroups
	if (access("/dev/nvidiactl", R_OK) == 0 && arg_no3d == 0) {
		fwarning("NVIDIA card detected, nogroups command ignored\n");
		can_drop_all_groups = 0;
		goto out;
	}

	/* When we are not sure that the system has working seat-based ACLs
	 * (e.g.: probably yes on (e)udev + (e)logind, probably not on eudev +
	 * seatd), supplementary groups (e.g.: audio and input) might be needed
	 * to avoid breakage (e.g.: audio or gamepads not working).  See #4600
	 * and #4603.
	 */
	if (access("/run/systemd/seats/", F_OK) != 0) {
		// TODO: wrc causes this to be printed even with (e)logind (see #4930)
		//fwarning("logind not detected, nogroups command ignored\n");
		can_drop_all_groups = 0;
		goto out;
	}

	if (arg_debug)
		fprintf(stderr, "nogroups command not ignored\n");
	can_drop_all_groups = 1;

out:
	return can_drop_all_groups;
}
int check_can_drop_all_groups() {
	static int can_drop_all_groups = -1;

	 
	if (can_drop_all_groups != -1)
		goto out;

	 
	if (access("/dev/nvidiactl", R_OK) == 0 && arg_no3d == 0) {
		fwarning("NVIDIA card detected, nogroups command ignored\n");
		can_drop_all_groups = 0;
		goto out;
	}

	 
	if (access("/run/systemd/seats/", F_OK) != 0) {
		 
		 
		can_drop_all_groups = 0;
		goto out;
	}

	if (arg_debug)
		fprintf(stderr, "nogroups command not ignored\n");
	can_drop_all_groups = 1;

out:
	return can_drop_all_groups;
}