summaryrefslogtreecommitdiffstats
path: root/common
AgeCommit message (Collapse)AuthorFilesLines
2013-10-09userpref: Free string in internal_set_value() to fix a memory leakGravatar Martin Szulecki1-0/+2
2013-10-08userpref: Free some plist return values to fix a few memory leaksGravatar Martin Szulecki1-0/+15
2013-09-27userpref: rename 'index' parameter to silece compiler warning on the PiGravatar Nikias Bassen1-2/+2
2013-09-27common/debug: remove inline from debug functions to make clang happyGravatar Nikias Bassen2-8/+8
2013-09-24userpref: return error if remove in userpref_remove_device_record failsGravatar Nikias Bassen1-3/+7
2013-09-21userpref: Use /var/lib/lockdown as the system-wide pair record path on LinuxGravatar Martin Szulecki1-4/+1
2013-09-19userpref: Use system wide pair record path and add config directory getterGravatar Martin Szulecki2-73/+4
2013-09-19userpref: fix leak and possible endless recursion in mkdir_with_parentsGravatar Nikias Bassen1-7/+4
2013-09-19utils: make buffer_write_to_filename overwrite instead of append to existing ↵Gravatar Nikias Bassen1-3/+1
files
2013-09-17userpref: Add missing argument docs for device_record_get_certs_as_pem()Gravatar Martin Szulecki1-0/+1
2013-09-17Make sure to re-use the DeviceCertificate instead of generating a new one ↵Gravatar Nikias Bassen2-2/+15
every time This prevented iTunes from using a pairing made by libimobiledevice giving an error that the device sent invalid data.
2013-09-17Fix broken build of GnuTLS and silence two compiler warningsGravatar Martin Szulecki1-2/+2
2013-09-17userpref: Add copyright referenceGravatar Martin Szulecki2-0/+2
2013-09-17Refactor userpref logic to use plist format and implement trust dialog handlingGravatar Martin Szulecki2-359/+361
iOS 7 introduced a new pairing workflow which increases security by showing a trust dialog to the user before pairing with the host is allowed. The userpref system was refactored to use the native plist format, too. Configuration files of the native implementations are used on each platform. Former configuration files are no longer in use and can be deleted.
2013-09-17common: Add helpers to read and write plist filesGravatar Martin Szulecki2-0/+106
2013-07-15userpref: correctly NULL-terminate arguments in string_concat callsGravatar Nikias Bassen1-2/+2
2013-07-13common: Fix malformed binary debug message dumpingGravatar Martin Szulecki1-1/+1
2013-07-13common: Fix WIN32 portability for recent userpref security fixGravatar Martin Szulecki1-1/+6
2013-07-13common: Implement stpcpy() replacement for systems lacking itGravatar Martin Szulecki2-0/+26
2013-07-02Bug #331 - Don't create a /tmp/root directory insecurelyGravatar Federico Mena Quintero1-29/+76
When finding the user's home directory to generate a subdirectory in $HOME/.config, we would fall back to /tmp if there were no environment variables for HOME or XDG_CONFIG_HOME. Since libimobiledevice gets used by upower, and since upowerd runs as root, this would cause a /tmp/root directory to be created insecurely, leaving upowerd vulnerable to a symlink attack. Now we fall back to getpwuid_r() to find the user's home directory if it is not provided in environment variables - this is the case when upowerd gets run via systemd, for example. The result is that we'll end up creating /root/.config, a safe directory, since regular users cannot create symlinks in /root. In the future we'll need a way for libimobiledevice to find where to store its pairing data on behalf of the console user, rather than writing it to /root. http://libiphone.lighthouseapp.com/projects/27916-libiphone/tickets/331-insecure-tmp-directory-use
2013-07-02common: Add utils.[ch] with a string_concat() functionGravatar Federico Mena Quintero3-1/+114
Instead of doing malloc() and repeated strcat(), which is an O(n^2) way to concatenate multiple strings, we define a single O(total_len) function that uses stpcpy(). This will also make the rest of the code more legible and safer.
2013-05-23Silence compiler warnings for win32 buildsGravatar Martin Szulecki2-1/+3
2013-04-25common: Move debug and userpref code into libinternalcommonGravatar Martin Szulecki5-1/+1465
2013-03-20move thread and socket code to "common" subdirGravatar Nikias Bassen5-0/+600