Ignore:
Timestamp:
Jun 25, 2006, 3:52:27 AM (18 years ago)
Author:
andree
Message:

Avoid false alerts about growisofs not running under sudo. This is
achieved by examining the growisofs binary and searching exactly one
occurrence of the string SUDO_COMMAND. This test is designed to
avoid false positives. Note that this check is only required for
growisofs and not for other tools that may be used in the future to
write DVDs.

To enhance usability, the associated error message will now also appear
in a pop-up rather than just as part of a bunch of diagnostics output on
the command line.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/common/libmondo-tools.c

    r678 r679  
    698698        }
    699699        if (getenv ("SUDO_COMMAND")) {
    700             fatal_error("Can't write DVDs as sudo because growisofs doesn't support this - see the growisofs manpage for details.");
     700            sprintf(command, "strings `which growisofs` | grep -c SUDO_COMMAND");
     701            if (!strcmp(call_program_and_get_last_line_of_output(command), "1")) {
     702                popup_and_OK("Fatal Error: Can't write DVDs as sudo because growisofs doesn't support this - see the growisofs manpage for details.");
     703                fatal_error("Can't write DVDs as sudo because growisofs doesn't support this - see the growisofs manpage for details.");
     704            }       
    701705        }
    702706        log_msg(2, "call_make_iso (DVD res) is ... %s",
Note: See TracChangeset for help on using the changeset viewer.