Handle sec= flag and GSS mode properly