Skip to content

cargo update requires elevation on windows #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
imbaczek opened this issue Aug 17, 2014 · 4 comments · Fixed by #420
Closed

cargo update requires elevation on windows #393

imbaczek opened this issue Aug 17, 2014 · 4 comments · Fixed by #420

Comments

@imbaczek
Copy link

Not even help works:

$ cargo help update
Subcommand failed to run: OS Error 740: Żądana operacja wymaga podniesienia uprawnień.
$ uname -a
MINGW32_NT-6.2 BAQ-DESKTOP 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys
$ cargo -V
cargo 0.0.1-pre-nightly (8241e31 2014-08-17 05:19:23 +0000)

Error 740 is "The requested operation requires elevation." in English.

@alexcrichton
Copy link
Member

Oh dear, that's not good! It looks like the files themselves may be corrupted as I can't run the executables manually, which seems highly suspicious!

@alexcrichton
Copy link
Member

It looks like this only affects cargo-update, and the reason is, (quoting rust-lang/rust#13439 (comment))

recent windows (>= 7) triggers UAC if executable has "update" in filename

@imbaczek
Copy link
Author

Adding a manifest should be the solution. I don't know what kind of
problems that may cause.

alexcrichton added a commit to alexcrichton/cargo that referenced this issue Aug 21, 2014
Any executable with the substring "update" on windows is subject to requiring
privilege escalation. For now we just rename the actual executable to
`cargo-updat` but rename all usage of it so that it's not actually visible.

Closes rust-lang#393
@imbaczek
Copy link
Author

note that embedding a manifest doesn't only remove the need for elevation, but also makes the application resistant against the VirtualStore insanity: http://blogs.technet.com/b/mrsnrub/archive/2010/08/11/uac-virtualization-allowing-standard-users-to-update-a-system-protected-area.aspx. getting rid of update.exe solves the direct problem, but manifests should be still included.

alexcrichton added a commit to alexcrichton/cargo that referenced this issue Aug 27, 2014
This commit removes all distributed executables except for `cargo`. All
builtin subcommands are implemented through library calls, and the fallback
methods are retained to maintain extensability through new subcommands.

Closes rust-lang#393
bors added a commit that referenced this issue Aug 27, 2014
This commit removes all distributed executables except for `cargo`. All
builtin subcommands are implemented through library calls, and the fallback
methods are retained to maintain extensability through new subcommands.

Closes #393
@bors bors closed this as completed in #420 Aug 27, 2014
alexcrichton added a commit to alexcrichton/cargo that referenced this issue Sep 2, 2014
This commit removes all distributed executables except for `cargo`. All
builtin subcommands are implemented through library calls, and the fallback
methods are retained to maintain extensability through new subcommands.

Closes rust-lang#393
bors added a commit to alexcrichton/cargo that referenced this issue Sep 2, 2014
This commit removes all distributed executables except for `cargo`. All
builtin subcommands are implemented through library calls, and the fallback
methods are retained to maintain extensability through new subcommands.

Closes rust-lang#393
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants