Skip to content

Commit

Permalink
Merge branch 'master' into m35
Browse files Browse the repository at this point in the history
  • Loading branch information
sorinj committed Jan 23, 2020
2 parents edf506d + e720e3e commit 0bd91bf
Show file tree
Hide file tree
Showing 159 changed files with 770 additions and 12,147 deletions.
1 change: 0 additions & 1 deletion doc/ClientLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Non-opt builds (dbg-win and coverage-win) allow provide much more logging and ha
[LoggingLevel]
LC_CORE=5
LC_NET=4
LC_PLUGIN=3
LC_SERVICE=3
LC_SETUP=3
LC_SHELL=3
Expand Down
1 change: 0 additions & 1 deletion doc/CustomizingOmaha.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ The following items **MUST** be changed before releasing a fork of Omaha. Prefe

> Generate new GUIDs for every interface and coclass. Changing the descriptive names for them isn't a bad idea either. (Do not, however, change code-level names such as `IAppBundle` or `GoogleUpdate3UserClass`.)
* **`omaha\plugins\update\activex\update_control_idl.idl`**

> Generate new GUIDs for every interface and coclass.
Expand Down
4 changes: 1 addition & 3 deletions doc/DeveloperSetupGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ These instructions are intended to assist the would-be Omaha developer with sett

We are striving to make the code build with the latest Windows toolchain from Microsoft. Since there is no continuous integration for this project, the code may not build using previous versions of the toolchain.

#### Currently, the supported toolchain is Visual Studio 2019 Update 16.3.6 and Windows SDK 10.0.18362.0. ####
#### Currently, the supported toolchain is Visual Studio 2019 Update 16.4.3 and Windows SDK 10.0.18362.0. ####

Visual Studio 2017 Update 15.9.16 should work too.

Expand All @@ -16,8 +16,6 @@ The following packages are required to build Omaha:
* A copy of the Omaha source code. This can be done by cloning this repository.
* Microsoft Visual Studio 2017 or 2019. The free Visual Studio Community edition is sufficient to build.
* Download [here](https://visualstudio.microsoft.com/downloads)
* ATL Server headers
* Download [here](http://atlserver.codeplex.com). Omaha needs this library for regular expression support.
* Windows 10 SDK.
* Download Windows 10 SDK [here](https://dev.windows.com/en-us/downloads/windows-10-sdk).
* Microsoft .NET Framework 2.0
Expand Down
1 change: 0 additions & 1 deletion doc/Omaha3SourceOrganization.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ omaha\
mi_exe_stub\ Produces a stub EXE, mi_exe_stub.exe, that will be combined
with a TAR to produce the untagged meta-installer. (The script to
actually do the merge lives in installers\, mentioned below.)
plugins\ Produces the browser plugin, npGoogleUpdate3.dll.
recovery\ Produces tools for “Code Red” - a mechanism that the apps being
managed by Omaha can use to check Omaha’s integrity, and
restore it if it appears broken.
Expand Down
4 changes: 1 addition & 3 deletions doc/Omaha3Walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The Omaha Client always operates at user privilege levels and owns the UI of Oma
* Setup - Create or update a permanent Omaha install, of either user or machine variety.
* Install - Invoke the COM server to create a state machine object, fill it out with apps to be managed, and call a suitable function on it such as `checkForUpdate()`, `download()`, or `install()`. From that point onwards, poll the state object as the COM server does the work for you, and update the UI as the states advance.

In general, when referring to “the client”, we’re referring to the official Google Update client, which happens to live in the same executable as the COM Server; the role that the executable plays is decided simply by which command line is passed to it. However, there are other clients that may access the COM server; some of them we own (the web browser plugins), and some we do not own (partner applications which access our COM APIs directly). The server must stay as secure as possible, and sanitize all input.
In general, when referring to “the client”, we’re referring to the official Google Update client, which happens to live in the same executable as the COM Server; the role that the executable plays is decided simply by which command line is passed to it. However, there are other clients that may access the COM server; The server must stay as secure as possible, and sanitize all input.

## Example Code Flow ##

Expand All @@ -50,7 +50,6 @@ appname=Google%20Chrome&needsadmin=False&lang=en"
* We check the machine to see if there’s already a user Omaha installed with a version newer than or equal to ours. (If it’s equal to ours, we will do some supplementary checking to make sure that the installed copy is sane and working properly, and if not, we over-install.) Let’s assume that there is no user Omaha installed. We will create the direct directory in `AppData`, copy over the files, and then make entries in the Registry to do the following:
* Register our COM servers
* Create scheduled tasks to check for an update every five hours
* Expose our web browser plugins to IE/Firefox/Chrome/Safari/Opera
* Store initial configuration/state for Omaha itself in the Registry
* Register Omaha itself as an Omaha-managed application, so it can check for updates for itself
* The client then starts a new copy of itself in its permanent installed location, modifying the command line from `/install` to `/handoff`. Once again, the constant shell loads Goopdate and passes the command line along - this time, however, we’re using the constant shell in the newly-created permanent install of Omaha, rather than the one in the temp directory.
Expand All @@ -74,7 +73,6 @@ So, what files are actually in a permanent install of Omaha once it’s complete
| `GoogleUpdateBroker.exe`<br><code>GoogleUpdateOnDemand.exe</code> <table><thead><th> COM Forwarders. Both of these are small EXEs whose sole purpose is to take their own command line, append a command line switch to the end, and pass it to the Constant Shell. </th></thead><tbody>
<tr><td> <code>goopdate.dll</code> </td><td> The central Omaha3 binary. </td></tr>
<tr><td> <code>goopdateres_*.dll</code> </td><td> Resource-only DLLs, one per language, containing localized strings. As part of its startup, Goopdate will read the “lang” extra-args parameter if one exists (or the Registry) and select a language to load. </td></tr>
<tr><td> <code>npGoogleUpdate3.dll</code> </td><td> Our web browser plugin. (It actually contains two plugins: ActiveX plugins for IE, and an NPAPI plugin for Firefox, Chrome, and other browsers that use that.) Allows Javascript on selected subdomains of google.com to access and use the COM Server. </td></tr>
<tr><td> <code>psmachine.dll</code><br><code>psuser.dll</code> </td><td> Custom marshaling stubs used by the COM Server. Used in order to work around some Windows bugs that are triggered by having both Machine and User Omaha installed simultaneously. </td></tr></tbody></table>

The directory tree typically looks like this:<br>
Expand Down
2 changes: 1 addition & 1 deletion doc/ServerProtocolV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ _Request Attributes_
* client (optional): Similar to brand code.
* iid (optional): A random GUID used to uniquely count install attempts. For example, if a user fails to install then re-runs the installer and succeeds, we might want to count that as one "attempt".
* installage (optional): The number of days since the app was first installed.
* installsource (optional): Specifies the source of the request. Examples include "oneclick", "clickonce", "ondemandupdate", "ondemandcheckforupdate", "offline", "scheduler", "core". This value is specified to the Omaha client on the command line.
* installsource (optional): Specifies the source of the request. Examples include "clickonce", "ondemandupdate", "ondemandcheckforupdate", "offline", "scheduler", "core". This value is specified to the Omaha client on the command line.
* fp (optional): Specifies a version-agnostic identifier for the last downloaded binary for this app. Usually "1.X" where X is the sha-256 hash of the downloaded binary.

_Response Attributes_
Expand Down
5 changes: 1 addition & 4 deletions omaha/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@
version_major = 1 # 1-65535
version_minor = 3 # 0-65535
version_build = 35 # 1-65535
version_patch = 421 # 0-65535

oneclick_plugin_version = 9
update_plugin_version = 3
version_patch = 441 # 0-65535
12 changes: 2 additions & 10 deletions omaha/base/apply_tag.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "omaha/base/apply_tag.h"

#include <intsafe.h>
#include <atlrx.h>
#include <algorithm>
#include <regex>
#include <vector>

#include "omaha/base/utils.h"
Expand All @@ -40,15 +40,7 @@ ApplyTag::ApplyTag()

bool ApplyTag::IsValidTagString(const char* tag_string) {
ASSERT1(tag_string);

CAtlRegExp<CAtlRECharTraitsA> regex;
REParseError error = regex.Parse(kValidTagStringRegEx);
if (error != REPARSE_ERROR_OK) {
return false;
}

CAtlREMatchContext<CAtlRECharTraitsA> context;
return !!regex.Match(tag_string, &context);
return std::regex_match(tag_string, std::regex(kValidTagStringRegEx));
}

HRESULT ApplyTag::Init(const TCHAR* signed_exe_file,
Expand Down
76 changes: 0 additions & 76 deletions omaha/base/atl_regexp.cc

This file was deleted.

151 changes: 0 additions & 151 deletions omaha/base/atl_regexp.h

This file was deleted.

39 changes: 0 additions & 39 deletions omaha/base/atl_regexp_unittest.cc

This file was deleted.

2 changes: 0 additions & 2 deletions omaha/base/build.scons
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ local_env = env.Clone()
inputs = [
'apply_tag.cc',
'app_util.cc',
'atl_regexp.cc',
'browser_utils.cc',
'cgi.cc',
'clipboard.cc',
Expand Down Expand Up @@ -61,7 +60,6 @@ inputs = [
'queue_timer.cc',
'reactor.cc',
'reg_key.cc',
'regexp.cc',
'registry_monitor_manager.cc',
'safe_format.cc',
'service_utils.cc',
Expand Down
Loading

0 comments on commit 0bd91bf

Please sign in to comment.