Maximus5 / conemu-old-issues

Old issues imported from googlecode. Project was moved to
https://conemu.github.io
6 stars 1 forks source link

Each Console Command in FAR Prompts for Elevation #1967

Closed Maximus5 closed 4 years ago

Maximus5 commented 9 years ago

Originally reported on Google Code with ID 1970

OS version: 6.3.9600 (Win8.1) x64
ConEmu version: 150420 (fresh preview)
Far version: 3.0 build 4242 x64

ConEmu extracted to FAR dir in C:\Program Files\Far Manager, macro scripts extracted
to FAR's %APPDATA% folder.

*Bug description*
Every command I execute in FAR (e.g. dir, cmd) causes an elevation prompt to be shown,
and does not execute until the prompt is dismissed.

*Steps to reproduction*
1. Run ConEmu 64 from the FAR dir.
2. It shows an elevation prompt for admin rights.
3. [NO], because I need all consoles to be non-elevated.
4. ConEmu starts OK and runs FAR.
5. Execute any console command from the FAR command line.
6. EVERY time you run a command it shows an elevation prompt again, and the command
is not executed until you dismiss the prompt with NO.

Might be an issue with on-demand elevation implementation in ConEmu.
I like how it's done in FAR: starts non-elevated and prompts just when (and if!) you
require it.

Reported by baltic@hypersw.net on 2015-04-22 18:35:40

Maximus5 commented 9 years ago
ConEmu do not request elevation if it was not required by user.
I do not know what do you have configured or what macros you've mentioned.
Anyway, that is not a proper issue.
If you do not need elevation - run clean ConEmu and Far.

Reported by ConEmu.Maximus5 on 2015-04-22 18:45:30

Maximus5 commented 9 years ago
Clean enough they are. 
This already reproed on two machines for me.
A stock FAR installation (all shipped plugins and macros selected for install).
A standard ConEmu extraction: binaries to FAR dir, LUA for FAR3 into %APPDATA% dir.
ConEmu started with Win+R. ConEmu has not been configured any much as well, it's freshly-installed.

Reported by baltic@hypersw.net on 2015-04-22 18:55:10

Maximus5 commented 9 years ago
Again. ConEmu do not request elevation when user runs commands.

Run from Win+R "ConEmu -basic -cmd cmd" and run any console command. No elevation request.

Run from Win+R "ConEmu -basic -cmd far /m" and run any console command. No elevation
request.

At last. Your issue does not provide any screenshots. Well I suppose you can't do them
due to UAC blocking.

Reported by ConEmu.Maximus5 on 2015-04-22 19:03:02

Maximus5 commented 9 years ago
Check your system and Far macros.

Reported by ConEmu.Maximus5 on 2015-04-22 19:05:14

Maximus5 commented 9 years ago
Ouch, ouch! I've nailed it down.
"From Roshal with love" that was.
See what happened.

I've downloaded ConEmu in an archive.
And this archive (not surprisingly) got an NTFS stream named Zone.Identifier added
to it, reading

[ZoneTransfer]
ZoneId=3

which means it's been downloaded from the Internet.
WinRAR always used to be good enough to skip this trash out and produce clean extracted
files.
Seems like after upgrading to the latest version it started propagating the Zone.Identifier
stream to files it writes!
So I ended up with all ConEmu exes and dlls having the Internet ZoneId on them. At
some point, the OS would prompt for whether to run such files, which looks pretty much
the same as the elevation prompt.

As I removed those streams with
PS> Get-ChildItem | Unblock-File
everything were going fine since then.

Maybe might be worth adding a check to conemu that its working files ain't got this
stream on them, suggesting to remove it if found. We're about to add such logic to
the entry point of our install-less tools, as users are running into this problem all
the time.

Reported by baltic@hypersw.net on 2015-04-22 19:41:35

Maximus5 commented 9 years ago
That is absolute crazy... Thanks for investigating that!

Reported by ConEmu.Maximus5 on 2015-04-22 23:16:57