QPackageRegistry Class Reference
|
Keyfile | Sequence | Manifest | Installs |
---|---|---|---|
$QPEDIR/etc/keyfile | $QPEDIR/etc/keyfile.sequence | $QPEDIR/etc/manifest | $QPEDIR/etc/installs |
Pseudo-code for binary file data record formats: See $QT_SOURCE_PATH/src/gui/embedded/qtransportauthdefs_qws.h for concrete details. usr_key_entry is from the kernel file include/linux/lidsext.h and is duplicated in the qtransportauthdefs_qws.h | |||
struct usr_key_entry char key[QSXE_KEY_LEN]; ino_t ino; // typically 4 bytes dev_t dev; // typically 8 bytes | struct AuthRecord
16 byte key
program id
change time // deprecated
| struct IdBlock quint64 inode quint64 device unsigned char progId unsigned short installId unsigned int keyOffset qint64 install_time | install record install id ":" path |
Contains the mapping between keys and files on disk. When the kernel contains the LIDS MAC Qt Extended patch the key file is implemented as the kernel /proc pseudo-file /proc/lids/keys. In this case this keyfile on disk storage is ignored. | This file is used simply to ensure a sequence of program id numbers. For historical and compatibility reasons, the first key issued with a number and the time are also recorded in this file. | Map Installed binaries by inode & device id to their program id - many binaries can map to a single program id. Records an install id for each binary. | Map install id to installed path of the binary. This is required mainly for uninstallation of packages. |
To query these files after a qbuild image use the tool $QTOPIA_SOURCE_PATH/scripts/dumpsec.pl
Both the proc pseudo file and the disk file have the same format, and if the /proc/lids/keys file is not present, disk files are used instead.
The struct usr_key_entry is defined in SXE kernel patch file include/linux/lidsif.h
struct usr_key_entry is the (new) data record format for the key file superseding the format used in Qtopia 4.1
The key file is (now) either /proc/lids/keys (and the per-process keys in /proc/<pid>/lids_key ) OR for desktop/development ONLY (not for production) it is $QPEDIR/etc/keyfile
The key file maps keys to files.
File are identified by inode and device numbers, not paths.
(See the "installs" file for path to inode/device mapping)
Disk keyfiles are to allow desktop development and testing only, since on desktop development machines the kernel patch will typically not be installed.
It is not supported on the device to operate without /proc/lids/keys
Where binary files are writeable (all downloaded programs must be writeable) the key is embedded in the binary at install time.
In the development and testing case, the embedded key is used by the binary to authenticate itself to the server.
When the kernel contains the LIDS MAC Qt Extended patch the binary reads its key from the /proc pseudo-file /proc/self/lids_key.
See also RegistryFile.
This enum specifies one of the registry files
Constant | Value | Description |
---|---|---|
QPackageRegistry::Keyfile | 0 | keyfile |
QPackageRegistry::Manifest | 2 | manifest keyfile |
QPackageRegistry::KeyfileSequence | 1 | key file |
QPackageRegistry::Installs | 3 | installs file |
QPackageRegistry::Policy | 4 | policy file |
Construct new QPackageRegistry object
Do not use this method, instead call the instance method getInstance()
See also getInstance().
Destroy the QPackageRegistry object
Bootstrap the qtopia image with sxe control files.
Creates (or truncates) new empty SXE control files, ready to be updated by the scanner. If the installRoot already contains non-empty files then it will refuse to overwrite them.
The return code of this is used as a unix exec return code, ie 0 is success non-zero is failure.
Return the key associated the specified program id progId.
As a host binary sxe_installer doesnt have access to this method in qtransportauth_qws.cpp, so reimplement it here.
In the SXE installer case assume there is a one-to-one mapping from keys to progId's since the installer ensures that.
Return a singleton instance of the QPackageRegistry object for this process.
Initialise an SxeProgramInfo pi which can then be used to register a sequence of same-domain binaries.
A new key and a new program id is created and stored in pi. The other fields are unchanged.
The keyfile.sequence file is used to track and issue new program id numbers.
This function is deprecated.
Return true if the connectionData connection is from an installed program, ie not one which is part of the base software.
The program is installed software if it is installed in Qtopia::packagePath()
Obtain a Qtopia::lockFile() on the manifest file. This represents locking the QPackageRegistry database system to allow write operations to be done by this process.
If successfully locked, the method sets success to true; otherwise it sets it to false.
Call this method to obtain the lock before performing any write operations to the SXE database system.
This should be matched by a call to unlockManifest()
See also unlockManifest().
Register a qtopia binary with the SXE system. The path to the binary is:
pi.absolutePath()
where the SxeProgramInfo pi contains all the information about the binary.
Note that binaries with the same domain (SXE policy profile) and binaries from the same package are coalesced into the same Program Id, and thus use the same secret key.
The SxeProgramInfo pi if uninitialised is modified by creating a new random key and program id. The id and key fields if initialised are used to register the binary.
See also SxeProgramInfo.
Return the authoritative path for where the SXE database files, such as installs, and manifest, are stored.
The directory must be writeable.
Current implementation is simply Qtopia::qtopiaDir() + "etc"
Release the lock on the manifest file.
See also lockManifest().
Unregisters a package's binaries from the SXE system for the given packagePath
returns true if the removal of the registration was successful; otherwise returns false
returns the QString name of the relative binary path, where SXE controlled executables are installed. Concatenate this with paths from installPaths() to find full paths which may contain binaries.
See also Qtopia::installPaths().
returns the QString name of the installs file, part of the SXE database
See also sxeConfPath().
returns the QString name of the manifest file, part of the SXE database
See also sxeConfPath().
returns the QString name of the profiles file, part of the SXE database
See also sxeConfPath().
returns the QString name of the relative quicklaunch binary path, where SXE controlled quicklaunched executables are installed. Concatenate this with paths from installPaths() to find full paths which may contain .so files.
See also Qtopia::installPaths().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com