diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2008-07-16 20:55:00 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2008-07-16 20:55:00 -0700 |
commit | 292703f5c8bfcda129f1b92fe9a77b289ee89342 (patch) | |
tree | 82c682ac070bccff16b86f85a074ba4c06cb50e3 | |
parent | 3fc4d780eea56a5bac0a31f6a385e99029fdae91 (diff) |
71.86.0671.86.06
-rw-r--r-- | DRIVER_VERSION | 2 | ||||
-rw-r--r-- | backup.c | 22 | ||||
-rw-r--r-- | install-from-cwd.c | 2 | ||||
-rw-r--r-- | kernel.c | 4 | ||||
-rw-r--r-- | log.c | 5 | ||||
-rw-r--r-- | nvidia-installer.c | 7 | ||||
-rw-r--r-- | nvidia-installer.h | 2 | ||||
-rw-r--r-- | option_table.h | 14 |
8 files changed, 46 insertions, 12 deletions
diff --git a/DRIVER_VERSION b/DRIVER_VERSION index 89cabc7..e1a9ec3 100644 --- a/DRIVER_VERSION +++ b/DRIVER_VERSION @@ -1 +1 @@ -71.86.04 +71.86.06 @@ -141,6 +141,7 @@ static char *create_backwards_compatible_version_string(const char *str); int init_backup(Options *op, Package *p) { + mode_t orig_mode; char *version; FILE *log; @@ -158,9 +159,22 @@ int init_backup(Options *op, Package *p) return FALSE; } + /* + * fopen below creates the file with mode 0666 & ~umask. + * In order to ensure the result of that calculation is BACKUP_LOG_PERMS, + * we temporarily set umask to ~BACKUP_LOG_PERMS to leave just the bits + * we want. + * + * This assumes that BACKUP_LOG does not already exist (if it does, the + * file permissions will not be modified.) This is assured by the + * directory removal and re-creation code above. + */ + orig_mode = umask(~BACKUP_LOG_PERMS); + /* create the log file */ log = fopen(BACKUP_LOG, "a"); + umask(orig_mode); if (!log) { ui_error(op, "Unable to create backup log file '%s' (%s).", BACKUP_LOG, strerror(errno)); @@ -184,14 +198,6 @@ int init_backup(Options *op, Package *p) return FALSE; } - /* set the log file permissions */ - - if (chmod(BACKUP_LOG, BACKUP_LOG_PERMS) == -1) { - ui_error(op, "Unable to set file permissions %04o for %s (%s).", - BACKUP_LOG_PERMS, BACKUP_LOG, strerror(errno)); - return FALSE; - } - return TRUE; } /* init_backup() */ diff --git a/install-from-cwd.c b/install-from-cwd.c index 2bd061c..4edd31f 100644 --- a/install-from-cwd.c +++ b/install-from-cwd.c @@ -109,6 +109,8 @@ int install_from_cwd(Options *op) if (!get_license_acceptance(op)) return FALSE; + ui_log(op, "Installing NVIDIA driver version %s.", p->version); + /* * determine the current NVIDIA version (if any); ask the user if * they really want to overwrite the existing installation @@ -1439,9 +1439,11 @@ int check_cc_version(Options *op, Package *p) * If we're building/installing for a different kernel, then we * can't do the gcc version check (we don't have a /proc/version * string from which to get the kernel's gcc version). + * If the user passes the option no-cc-version-check, then we also + * shouldn't perform the cc version check. */ - if (op->kernel_name) { + if (op->ignore_cc_version_check) { setenv("IGNORE_CC_MISMATCH", "1", 1); return TRUE; } @@ -97,7 +97,8 @@ void log_init(Options *op) now = time(NULL); log_printf(op, TRUE, NULL, "creation time: %s", ctime(&now)); - + log_printf(op, TRUE, NULL, "installer version: %s", + NVIDIA_INSTALLER_VERSION); log_printf(op, TRUE, NULL, ""); log_printf(op, TRUE, NULL, "option status:"); @@ -149,6 +150,8 @@ void log_init(Options *op) SELINUXSTR(op->selinux_option)); log_printf(op, TRUE, NULL, " no X server check : %s", BOOLSTR(op->no_x_check)); + log_printf(op, TRUE, NULL, " no cc version check : %s", + BOOLSTR(op->ignore_cc_version_check)); log_printf(op, TRUE, NULL, " force tls : %s", TLSSTR(op->which_tls)); #if defined(NV_X86_64) diff --git a/nvidia-installer.c b/nvidia-installer.c index 5fd7d63..943f02d 100644 --- a/nvidia-installer.c +++ b/nvidia-installer.c @@ -288,6 +288,7 @@ Options *parse_commandline(int argc, char *argv[]) case 'k': op->kernel_name = optarg; op->no_precompiled_interface = TRUE; + op->ignore_cc_version_check = TRUE; break; case XFREE86_PREFIX_OPTION: @@ -424,6 +425,9 @@ Options *parse_commandline(int argc, char *argv[]) case NO_X_CHECK_OPTION: op->no_x_check = TRUE; break; + case NO_CC_VERSION_CHECK_OPTION: + op->ignore_cc_version_check = TRUE; + break; default: fmterr(""); @@ -489,6 +493,9 @@ int main(int argc, char *argv[]) { Options *op; int ret = FALSE; + + /* Ensure created files get the permissions we expect */ + umask(022); /* parse the commandline options */ diff --git a/nvidia-installer.h b/nvidia-installer.h index 5a68f55..0e87fdf 100644 --- a/nvidia-installer.h +++ b/nvidia-installer.h @@ -185,6 +185,8 @@ typedef struct __options { void *ui_priv; /* for use by the ui's */ + int ignore_cc_version_check; + } Options; diff --git a/option_table.h b/option_table.h index 3dcd277..9fc968b 100644 --- a/option_table.h +++ b/option_table.h @@ -51,7 +51,8 @@ enum { DOCUMENTATION_PREFIX_OPTION, X_LIBRARY_PATH_OPTION, NO_KERNEL_MODULE_OPTION, - NO_X_CHECK_OPTION + NO_X_CHECK_OPTION, + NO_CC_VERSION_CHECK_OPTION }; static const NVOption __options[] = { @@ -407,6 +408,17 @@ static const NVOption __options[] = { "restores the SIGWINCH signal handler after the child process " "has terminated. This option disables this behavior." }, + { "no-cc-version-check", NO_CC_VERSION_CHECK_OPTION, 0, + "The NVIDIA kernel module should be compiled with the same compiler that " + "was used to compile the currently running kernel. The layout of some " + "Linux kernel data structures may be dependent on the version of gcc " + "used to compile it. The Linux 2.6 kernel modules are tagged with " + "information about the compiler and the Linux kernel's module loader " + "performs a strict version match check. nvidia-installer checks for " + "mismatches prior to building the NVIDIA kernel module and aborts the " + "installation in case of failures. Use this option to override this " + "check." }, + /* Orphaned options: These options were in the long_options table in * nvidia-installer.c but not in the help. */ { "debug", 'd', 0, NULL }, |