View | Details | Raw Unified | Return to bug 1086936
Collapse All | Expand All

(-)a/src/pk-transaction.c (-20 / +8 lines)
Lines 2351-2375 pk_transaction_authorize_actions_finished_cb (GObject *source_object, Link Here
2351
2351
2352
	/* did not auth */
2352
	/* did not auth */
2353
	if (!polkit_authorization_result_get_is_authorized (result)) {
2353
	if (!polkit_authorization_result_get_is_authorized (result)) {
2354
		if (g_strcmp0 (action_id, "org.freedesktop.packagekit.package-install") == 0 &&
2354
		priv->waiting_for_auth = FALSE;
2355
			       pk_bitfield_contain (priv->cached_transaction_flags,
2355
		/* emit an ::StatusChanged, ::ErrorCode() and then ::Finished() */
2356
						    PK_TRANSACTION_FLAG_ENUM_ALLOW_REINSTALL)) {
2356
		pk_transaction_status_changed_emit (data->transaction, PK_STATUS_ENUM_FINISHED);
2357
			g_debug ("allowing just reinstallation");
2357
		pk_transaction_error_code_emit (data->transaction, PK_ERROR_ENUM_NOT_AUTHORIZED,
2358
			pk_bitfield_add (priv->cached_transaction_flags,
2358
						"Failed to obtain authentication.");
2359
					 PK_TRANSACTION_FLAG_ENUM_JUST_REINSTALL);
2359
		pk_transaction_finished_emit (data->transaction, PK_EXIT_ENUM_FAILED, 0);
2360
		} else {
2360
		syslog (LOG_AUTH | LOG_NOTICE, "uid %i failed to obtain auth", priv->uid);
2361
			priv->waiting_for_auth = FALSE;
2361
		goto out;
2362
			/* emit an ::StatusChanged, ::ErrorCode() and then ::Finished() */
2363
			pk_transaction_status_changed_emit (data->transaction, PK_STATUS_ENUM_FINISHED);
2364
			pk_transaction_error_code_emit (data->transaction, PK_ERROR_ENUM_NOT_AUTHORIZED,
2365
							"Failed to obtain authentication.");
2366
			pk_transaction_finished_emit (data->transaction, PK_EXIT_ENUM_FAILED, 0);
2367
2368
			syslog (LOG_AUTH | LOG_NOTICE,
2369
				"uid %i failed to obtain auth",
2370
				priv->uid);
2371
			goto out;
2372
		}
2373
	}
2362
	}
2374
2363
2375
	if (data->actions->len <= 1) {
2364
	if (data->actions->len <= 1) {
2376
- 

Return to bug 1086936