privileges

Run child process non-elevated from an elevated/As Admin process

半世苍凉 提交于 2019-11-29 12:50:14
My application has a built-in self update system via another app called "updater.exe" which is in the same folder with the main application to update. It downloads the newest version, terminates the old one (if it's running) and then overwrites it. The problem is, to do that the updater.exe must be run with the Administrator privileges in order to have access to C:\Program Files\MyApp So far so good, the main app runs the updater.exe with Admin privileges (using UAC) but then the problem appears: After update is completed, I want the new installed version to start automatically. Guess what? Of

How to gain root privileges for iOS app?

懵懂的女人 提交于 2019-11-29 12:42:25
I'm currently building an app for jailbroken device, and I need root privileges for my app so that I can perform some tasks ask root. I found a related question : Gaining root permissions on iOS for NSFileManager (Jailbreak) . But I am really new to iOS, I don't understand and unable to complete task from step 4. Can anyone make it more detail please? What step 4 is telling you: Open the original executable file and delete its contents (the contents are now stored in the previously copied and renamed binary). is simply that you have moved the executable file for your app to a new filename, and

C++: Run program as administrator

北慕城南 提交于 2019-11-29 11:56:11
问题 Some programs are automatically asking for administrator rights when you run them. These programs are marked with a little shield in the bottom right corner: Now I'm wondering how I could accomplish this in C++. Is there a function for this or do I need some special compiler/linker commands for that? 回答1: You must be probably looking for CreateProcessAsUser or CreateProcessWithLogonW function. There is one more option like this:- Go to the project's Property Pages dialog box. Now open the

“IDENTIFIED BY 'password'” in MySQL

人走茶凉 提交于 2019-11-29 11:03:49
问题 I often see in many MySQL tutorials that people use command IDENTIFIED BY 'password' both during user creation and granting him privileges. For example: CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON database.* TO 'username'@'localhost' IDENTIFIED BY 'password'; I tried using GRANT without IDENTIFIED BY and it works. Can somebody explain me why it is used twice? Could there be other password for specific privileges? 回答1: GRANT is meant for adding

How does a program ask for administrator privileges?

心不动则不痛 提交于 2019-11-29 10:39:50
I am developing an application using vb.net. For performing some tasks the application needs administrator privileges in the machine. How to ask for the privileges during the execution of the program? What is the general method of switching user accounts for executing an application? In other words, is there some way for an application to run under an arbitrary user account? You can edit the UAC Settings (in VB 2008) which is located in the Project Settings. Look for the line that says <requestedExecutionLevel level="asInvoker" uiAccess="false" /> Change level="asInvoker" to level="asInvoker"

Does full trust mean the same as Run As Administrator

十年热恋 提交于 2019-11-29 05:47:24
Does full trust mean the same as Run As Administrator? I have read things stating that "for this to work, the application must be a full-trust application." Is that the same as you must have administrator privileges to run the application? If not, what's the difference? How can you tell if an app is "full-trust"? I am told that "Administrator or not, .Net apps won't do certain things if they aren't running from a 'trusted' location." What is a "trusted location"? If you run an app from a "trusted location", can you do things that "require full-trust" without being an administrator? No. Full

Privileged operations in netbeans mobility

元气小坏坏 提交于 2019-11-29 05:14:32
I'm writing a Java ME app that will use privileged operations such as messaging. By default the user is prompted to confirm each of these operations, but I would like to run it as a background service. Documentation says to request permission in the jad file, I have done so and presume it will work on a device. However I would like to test this on the Netbeans mobility emulator first. I tried signing the app as "trusted" but my emulated execution still prompts the user for permission. michael aubert The MIDP security model needs to be explained in 2 parts: The phone (or the emulator) contains

Running a process with lowest possible privileges in winapi

帅比萌擦擦* 提交于 2019-11-29 04:22:01
I am writing something similar to the http://ideone.com/ . Currently I am running user processes with CreateProcess call. I kill the process if it runs longer then specified amount of time but I don't know how to deny read/write filesystem rights / creating process rights etc. to the created process. The given executable can be literally anything and I need to allow only stdin / stdout. Also it would be great if I could set working memory set. I read a lot of articles on msdn such as CreateProcessAsUser Function , CreateProcessWithLogonW Function etc. but I get confused very fast (probably

Restricted PostgreSQL permissions for web app

China☆狼群 提交于 2019-11-29 02:56:10
问题 Goal Create a database with three users and restrict their privileges (I'm just thinking out loud, so my user separation is also open to correction): Superuser - this user allows for the very initial provisioning of the database. Create the application database, create the other users, set their privileges. Default postgres superuser works for me, so this one is done. Administrator - this user has access only to the database that was created during provisioning. Administrator can CRUD all

Ansible non-root sudo user and “become” privilege escalation

家住魔仙堡 提交于 2019-11-28 21:29:29
I've set up a box with a user david who has sudo privileges. I can ssh into the box and perform sudo operations like apt-get install . When I try to do the same thing using Ansible's "become privilege escalation", I get a permission denied error. So a simple playbook might look like this: simple_playbook.yml: --- - name: Testing... hosts: all become: true become_user: david become_method: sudo tasks: - name: Just want to install sqlite3 for example... apt: name=sqlite3 state=present I run this playbook with the following command: ansible-playbook -i inventory simple_playbook.yml --ask-become