VirtualBox

Changeset 83409 in vbox for trunk


Ignore:
Timestamp:
Mar 25, 2020 1:15:39 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136626
Message:

Guest Control/VBoxService: Resolved another @todo: Don't ignore non-options in the guest session argument handler. bugref:9320

Location:
trunk/src/VBox/Additions/common/VBoxService
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp

    r82968 r83409  
    915915     */
    916916    if (   argc >= 2
    917         && !RTStrICmp(argv[1], "guestsession"))
     917        && !RTStrICmp(argv[1], VBOXSERVICECTRLSESSION_GETOPT_PREFIX))
    918918        fUserSession = true;
    919919#endif
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.h

    r83286 r83409  
    145145typedef VBOXSERVICECTRLSESSIONTHREAD *PVBOXSERVICECTRLSESSIONTHREAD;
    146146
     147/** Defines the prefix being used for telling our service executable that we're going
     148 *  to spawn a new (Guest Control) user session. */
     149#define VBOXSERVICECTRLSESSION_GETOPT_PREFIX             "guestsession"
     150
    147151/** Flag indicating that this session has been spawned from
    148152 *  the main executable. */
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp

    r83349 r83409  
    26822682
    26832683            case VINF_GETOPT_NOT_OPTION:
    2684                 /* Ignore; might be "guestsession" main command. */
    2685                 /** @todo r=bird: We DO NOT ignore stuff on the command line! */
    2686                 break;
    2687 
     2684            {
     2685                if (!RTStrICmp(ValueUnion.psz, VBOXSERVICECTRLSESSION_GETOPT_PREFIX))
     2686                    break;
     2687                /* else fall through and bail out. */
     2688                RT_FALL_THROUGH();
     2689            }
    26882690            default:
    2689                 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Unknown command '%s'", ValueUnion.psz);
     2691                return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Unknown argument '%s'", ValueUnion.psz);
    26902692        }
    26912693    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette